-
-
Notifications
You must be signed in to change notification settings - Fork 746
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 more dependency-related BUILD metadata #6254
Merged
Merged
Conversation
This file contains 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
…pendency metadata
cognifloyd
requested review from
nzlosh,
mamercad,
guzzijones,
amanda11 and
a team
September 26, 2024 15:44
pull-request-size
bot
added
the
size/L
PR that changes 100-499 lines. Requires some effort to review.
label
Sep 26, 2024
guzzijones
approved these changes
Sep 26, 2024
nzlosh
approved these changes
Sep 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
infrastructure: ci/cd
pantsbuild
size/L
PR that changes 100-499 lines. Requires some effort to review.
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.
This PR has commits extracted from #6202 where I'm working on getting all of our unit tests to run under pants+pytest.
This PR adds dependency-related BUILD metadata required to run various tests. In general, this includes:
uses=[...]
: Makes ourpants-plugins/uses_services
plugin check for running services before running the tests.stevedore_namespaces=[...]
: Includes all plugins of each type (each stevedore namespace) listed. For example,stevedore_namespaces=["st2common.runners.runner"]
would make all runners available when running a set of tests.entry_point_dependencies=[...]
: A more fine-grained version of steveore_namespaces. Instead of including every plugin that provide a given type, this includes selected entry points. This is especially helpful for runner tests, so thatnoop_runner
tests only require the noop runner, instead of all of the runners. This feature is part of pants 2.23. It is one of the reasons we updated to 2.23 alpha in Pants upgrade from 2.22.0 to 2.23.0a0 #6229 instead of waiting for a stable release.dependencies=[...]
: some tests depend on various files that pants cannot infer based on pants dependencies. For example, when a test runs an action via the API, there is no import that tells pants which action the test needs.resources(...)
: some tests needed files that were not covered by any of the BUILD targets, so I added the files asresources
.It can be beneficial to step through the commits. That will show you which tests needed the metadata.