-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cache and store primer packages via the default branch #6703
Conversation
Pull Request Test Coverage Report for Build 2396032378
💛 - Coveralls |
Should we set the commit we're analyzing for each repositories ? I.e. we set the sha for each package to prime. This way we can't have a new message that appears simply because something was added on the primed repo. We could upgrade the primer repo to the latest version before release so we're still somewhat up to date. |
I don't think so. The idea is to run Lastly, we run |
id: cache-projects | ||
uses: actions/cache@v3 | ||
with: | ||
path: .pylint_primer_tests/ |
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.
Should we add a .gitignore to this directory to ensure it always exists? I'm thinking for local testing etc.
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.
Isn't this a .gitkeep
?
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.
Added!
tests/primer/primer_tool.py
Outdated
if commit_string: | ||
with open("commit_string.txt", "w", encoding="utf-8") as f: | ||
f.write(commit_string) |
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.
Probably should add to the project's .gitignore.
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 have changed this to go into the primer directory instead of writing to root.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Test run on my fork |
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.
This is pretty great ! We'll have even more confidence when releasing.
Type of Changes
Description
Ref. #5364.
This is in preparation of a full fledged primer which can warn us about false positives and negatives.
This adds:
main
that caches and downloads all packages intests/primer/packages_to_prime.json
.main
and gets its cache from there.The cache is managed by what I call the
commitstring
, which is just a concatenation of all commits that the packages to prime are on.Because this needs to be merged into
main
to work you can see a working example here:Job on
main
:https://github.com/DanielNoord/pylint/runs/6606171195?check_suite_focus=true
PR that gets triggered after that push:
DanielNoord#145
Successful job on the PR:
https://github.com/DanielNoord/pylint/runs/6606228882?check_suite_focus=true
You can look at the restore cache jobs to see that this works.
In itself this PR doesn't really add much, but the extra run time is about 60 seconds for both jobs together and only about 20 seconds for a PR. Since the workflow for
primer
depends on stuff being already merged onmain
I'd like to do some preparation PRs to build on like this.