-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Configure pants_ignore
and bump pants to v2.14.0rc1
#5733
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
25164ca
to
fd9a933
Compare
pants_ignore
and bump pants to v2.14.0rc0pants_ignore
and bump pants to v2.14.0rc1
Eric-Arellano
approved these changes
Sep 17, 2022
rush-skills
approved these changes
Sep 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
arm4b
approved these changes
Sep 20, 2022
I used 2.14 for the PoC due to some features that simplify the pants configuration. Ideally, 2.14.0 final will be released in a month or so, while we finalize the st2 dev docs. This should be the final piece before we can run ./pants tailor.
these requirements files will eventually be deleted. Including duplicate requirements definitions makes dependency inferrence ambiguous in pants, so we need to avoid adding duplicates.
fd9a933
to
de76c96
Compare
This was referenced Sep 20, 2022
This was referenced Oct 5, 2022
This was referenced Oct 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
infrastructure: ci/cd
maintenance
pantsbuild
size/S
PR that changes 10-29 lines. Very easy 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.
Background
This is another part of introducing
pants
, as discussed in the TSC Meetings on 12 July 2022, 02 Aug 2022 and 06 Sept 2022. Pants has fine-grained per-file caching of results for lint, fmt (like black), test, etc. It also has lockfiles that work well for monorepos that have multiple python packages. With these lockfiles CI should not break when any of our dependencies or our transitive dependencies release new versions, because CI will continue to use the locked version until we explicitly relock with updates.To keep PRs as manageable/reviewable as possible, introducing pants will take a series of PRs. I do not know yet how many PRs; I will break this up into logical steps with these goals:
pants
to the st2 repo, andpants
step-by-step.Other pants PRs include:
Overview of this PR
As described in #5732, we need to run
./pants tailor ::
(ie step5 to generate metadata (BUILD
) files.If we ran that now, tailor would (a) hit some deprecation messages, and (b) add some metadata that we don't want.
So, this PR adjusts the pants config enough for tailor to do a satisfactory first pass on the st2 repo. I've divided these changes into 3 commits:
setup.py
anddist_utils.py
python_requirements
targetsUpgrade to pants 2.14.0rc1
pants
2.13 has deprecations that require explicit (temporary) config in pants.toml. But 2.14 defaults to the newer setting and deprecates the option in pants.toml. So, if we just start with 2.14, we can avoid the options churn.Also, the latest work on the pants PoC branch used a new feature from a dev release of pants 2.14. But, I don't want to rely on dev releases, so I used 2.13.0rc0 in #5713. Since then 2.13.0 was released and 2.14 had two rc releases. So, it is safe enough to bump to 2.14 now.
I hope to finish bumping to the final 2.14.0 release as soon as it is released.
[GLOBAL].pants_ignore
(inpants.toml
)Both of the other commits add entries to
[GLOBAL].pants_ignore
. This setting is described here:So, we use this to make sure pants ignores some files even though we have them checked into git.
In particular, we have pants ignore:
setup.py
anddist_utils.py
:setup.py
if needed. So, we will be able to completely remove these files once we're done moving to pants.dist_utils.py
has multiple copies across the repo, if we didn't ignore them, we would have to add explicit dependency metadata because pants can't tell whichdist_utils
setup imports.requirements.txt
files:BUILD
file if pants can't infer the dep. So, pants will obsolete all of our manual dep management (in-requirements.txt
) and the script that generated the deps file for pip (requirements.txt
).If we did not have pants ignore these,
./pants tailor
would addpython_sources
andpython_requirements
targets in BUILD files that are problematic in that we would have to add extra metadata to avoid ambiguous imports errors.