Skip to content

Conversation

@MHendricks
Copy link
Member

@MHendricks MHendricks commented Apr 28, 2025

Checklist

  • I have read the CONTRIBUTING.md document
  • I formatted my changes with black
  • I linted my changes with flake8
  • I have added documentation regarding my changes where necessary
  • Any pre-existing tests continue to pass
  • Additional tests were made covering my changes

Types of Changes

  • Bugfix (change that fixes an issue)
  • New Feature (change that adds functionality)
  • Documentation Update (if none of the other choices apply)

Proposed Changes

Not all users need access to all of the programs required. For example Producers rarely need to open DCC's like Houdini, but still need access to other tools exposed by hab. This allows you to add per-site stub_distros definitions that prevent raising InvalidRequirementError if not installed. This doesn't remove the distro from the dependency, instead it adds a StubDistroVersion with the version 0+stub.

Allowing stub distros can be done at the site level but can also be overridden per URI config. This improves upon and replaces the omittable_distros system. Omittable distros are converted to URI config stub distros and a warning is logged when using that URI so maintainers know to switch.

@MHendricks MHendricks force-pushed the mikeh/stubs branch 9 times, most recently from 19f9ca2 to 2151f4c Compare May 2, 2025 22:46
@MHendricks MHendricks marked this pull request as ready for review May 5, 2025 19:23
MHendricks added 8 commits May 5, 2025 16:16
Note: This only works for python 3.8+ as it requires the dep_logic library.
- Moved InvalidRequirementError raise from solvers.py into find_distros.
- Fixing a bug that could have caused a invalid requirement to be lost.
See changes in hab/solvers.py line 148 and tests/test_resolver.py line 514.
This can be used by Config's to only emit logging messages if they are
converted into a FlatConfig.
Stub distros provide a way to prevent raising errors if specific distros
are not installed on a workstation. Not all users require workstations
capable of running heavy applications so it doesn't make sense to install
those applications on the workstation.
Stub_distros is more powerful and flexible. This will automatically convert
any existing omittable_distros in configs to config stub_distros. It shows
a warning about converting any omittable_distros encountered to stubs.
@MHendricks MHendricks merged commit 0cf36b6 into main May 5, 2025
36 checks passed
@MHendricks MHendricks deleted the mikeh/stubs branch May 5, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants