Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pants: add dependencies to the st2tests python_distributions #5929

Merged
merged 11 commits into from
Mar 10, 2023

Conversation

cognifloyd
Copy link
Member

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_distribution for st2common, this PR adds the remaining dependencies for the st2tests component python_distribution targets. The remaining distributions deps are covered by #5928.

Thanks to the nature of st2tests the 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 st2common in #5925, I tried to minimize the deps on the st2tests python_distribution, but the contents are so varied, the list is much longer than I would prefer. Again, we can't use globs in dependencies because of how the pants caching works.

Pants documentation

@cognifloyd cognifloyd added this to the pants milestone Mar 10, 2023
@cognifloyd cognifloyd requested review from winem, arm4b, nzlosh, rush-skills, amanda11 and a team March 10, 2023 04:28
@cognifloyd cognifloyd self-assigned this Mar 10, 2023
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Mar 10, 2023
@cognifloyd cognifloyd requested a review from a team March 10, 2023 06:38
@cognifloyd cognifloyd enabled auto-merge March 10, 2023 16:51
…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.
@cognifloyd cognifloyd force-pushed the pants-python_distributions-deps-3 branch from e67d2db to 1fd08cd Compare March 10, 2023 17:53
@cognifloyd cognifloyd merged commit c5ec5b0 into master Mar 10, 2023
@cognifloyd cognifloyd deleted the pants-python_distributions-deps-3 branch March 10, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pantsbuild size/L PR that changes 100-499 lines. Requires some effort to review. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants