Pants: add dependencies to the st2tests python_distributions#5929
Merged
cognifloyd merged 11 commits intomasterfrom Mar 10, 2023
Merged
Pants: add dependencies to the st2tests python_distributions#5929cognifloyd merged 11 commits intomasterfrom
python_distributions#5929cognifloyd merged 11 commits intomasterfrom
Conversation
This was referenced Mar 10, 2023
nzlosh
approved these changes
Mar 10, 2023
rush-skills
approved these changes
Mar 10, 2023
…pack The mock enforces that only the generic pack path gets returned for all of the tests in st2actions/tests/unit/test_actions_registrar.py even though it called fixtures_loader.get_fixtures_base_path(). Make that even clearer by importing the base path from st2tests.fixtures.generic.fixture I tried a variety of ugly hacks to depend on many of the packs in that directory. It is a relief to not use those hacks now that I understand that only the generic pack matters.
e67d2db to
1fd08cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This is another part of introducing pants, as discussed in various TSC meetings.
Related PRs can be found in:
Overview of this PR
Like #5925, which adds dependencies for the
python_distributionforst2common, this PR adds the remaining dependencies for thest2testscomponentpython_distributiontargets. The remaining distributions deps are covered by #5928.Thanks to the nature of
st2teststhe changes vary quite a bit between the BUILD files (ie each fixture is slightly different, so its deps are also a bit different). Also, since these are test fixtures, once I decided how to model the metadata, a few of the changes spilled over into the tests that use the fixtures (in st2actions and st2common).Also, similar to
st2commonin #5925, I tried to minimize the deps on thest2testspython_distribution, but the contents are so varied, the list is much longer than I would prefer. Again, we can't use globs independenciesbecause of how the pants caching works.Pants documentation
python_distributiontarget