-
Notifications
You must be signed in to change notification settings - Fork 4k
Generate constraints files for all supported Python versions #6234
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
Conversation
68b183b to
c7c0ead
Compare
.github/actions/make_init/action.yml
Outdated
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.
I don't understand why my contribution doesn't work without it even though I didn't change anything in cache yarn, but now it's needed.
4185257 to
b126a09
Compare
sfc-gh-tszerszen
left a comment
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.
Can't wait to see this merged 😍
vdonato
left a comment
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.
Didn't have time to look at this today, but I'll take a pass tomorrow
vdonato
left a comment
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.
Some minor nits, but LGTM
I think we may also want to run this by ProdSec since I'm not sure whether they'll have an opinion on automated commits being made to the repo
I am working on it. Prodsec doesn't see the problem, but I have yet to confirm this with CorpSec, which manages the Github infra. |
6a9bddc to
98ef641
Compare
1241261 to
022a3b7
Compare
|
I have approvals from the corp sec team and the prod sec team for this change. RA is not needed. |
022a3b7 to
8b5ea08
Compare
f8534fb to
db216d9
Compare
|
Thanks for taking this on, @sfc-gh-kbregula! A couple nits:
@sfc-gh-tteixeira writes amazing PR descriptions - see #5857 for the gold standard. (We definitely don't need all PR descriptions to be this thorough, but it's a good north star to aim for!)
We don't need to document literally everything we do - sometimes code really is simple and short enough that you can understand it without additional docstrings or comments. But in general, I prefer over-documenting to under-documenting; it makes life easier for coworkers, and also for the future versions of ourselves who may have forgotten the whats and whys of the code when we revisit it months or years later :) |
tconkling
left a comment
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.
(Whoops, I left my feedback in a non-review comment - see above!)
8b85473 to
14d777a
Compare
|
@tconkling Thanks for the review. I added more documentation and updated the PR description to add more context to this change. |
tconkling
left a comment
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.
The documentation you added is fantastic. Thanks @sfc-gh-kbregula!
8e57404 to
69381b8
Compare
📚 Context
This PR makes two changes:
Tested Python versions
Checking whether tests should be run for all supported Python versions, or whether it is enough to check the oldest and latest versions depending on what event triggered the current GitHub Action build to run.
For
pull_requestevent, we test all supported Python versions when at least one of the conditions is met:In other case, we only test latest and oldest supported Python version
For
pushevent, we return true when the default branch is checked. In other case, we only tests latest and oldest supported Python versionFor other events, we only test latest and oldest supported Python version.
Constraint files
For each build, a list of all Python dependencies that have been installed is generated, written to a file, and published as an artifact. In addition, for successful builds on
developbranch, these files are also published onconstraints-developbranch. This way, we track a tested and working set of dependencies.Those “known-to-be-working” constraints are generated per major/minor Python version for all supported Python versions.
To use the constraints file for installation, you need to add the
-cflag to pip and pass the URL to the file:Next steps
As a next step, I would like to make the following changes:
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.