-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Add ability to check if lockfiles are up-to-date with all declared requirements #15723
Comments
Pex supports this sort of check now via |
@jsirois yeah, that's a different kind of check than what I'm looking for (and it can already be replicated by regenerating lockfiles via pants, though maybe it's less efficient that way). I don't want people to get dinged on PR checks because an existing transitive dependency has released a new version, but I do want them to get dinged if they changed a |
I will note though, that for that it is a bit odd Pants doesn't auto-regen locks. If you update requirements that are inputs to a lock, it seems to me any action that reads the lock should trigger an auto update. I can't see where you'd ever not want that. |
Even if (maybe especially if) the auto-update was implemented, we'd want to include a lock-check in CI to cover the case where somebody's:
If Pants was auto-regenerating locks then I'd think |
Agreed. We apparently don't worry about this same scenario since, for example, there is |
Poetry solves it by providing 3 options:
Which of these does Pants have now? |
#15704 is the ticket to add the equivalent of Personally I'd prefer for |
100% agree! I think Pants (and Poetry too) should default to |
I had an idea for an approach to this: have this checking behaviour run for It appears that such targets are already added implicitly for the lockfile files, so this would mean a typical CI command like Downside: these targets do not currently depend on the input |
Is your feature request related to a problem? Please describe.
I'd like to add a step to my team's CI pipeline to assert that our lockfiles are up-to-date. My first thought was to run
./pants generate-lockfiles
and then assert on something likegit status --porcelain
. This doesn't work because./pants generate-lockfiles
isn't idempotent - it will eagerly bump versions of dependencies when new versions are released that satisfy our requirement constraints.Describe the solution you'd like
Quoting @stuhood from #15704:
The text was updated successfully, but these errors were encountered: