-
Notifications
You must be signed in to change notification settings - Fork 37.4k
ci: Invalidate depends caches when sources have been changed #22710
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
Concept ACK |
beac4f8
to
93f3427
Compare
Approach ACK |
CI is green, and this PR is ready for reviewing :) |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
.cirrus.yml
Outdated
@@ -41,9 +40,14 @@ global_task_template: &GLOBAL_TASK_TEMPLATE | |||
folder: "/tmp/ccache_dir" | |||
depends_built_cache: | |||
folder: "depends/built" | |||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git log -1 --oneline ./depends) |
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.
Might use git rev-list -1 HEAD ./depends
here; this prints only the (full, independent of core.abbrev
) commit hash.
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.
Thanks! Updated.
Updated 93f3427 -> f52a72a (pr22710.04 -> pr22710.05, diff): |
cr ACK f52a72a |
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.
crACK f52a72a
e9cf506 ci: Make git available for all merge commits (Hennadii Stepanov) 040e4de scripted-diff: Rename template to avoid CI configuration parsing warning (Hennadii Stepanov) Pull request description: 1) Remove Cirrus CI configuration parsing warning:   2) Make `git` available for merge commits, because it is now required for `depends_sources_cache` and `depends_built_cache`. Top commit has no ACKs. Tree-SHA512: d5cfb49492d2635fc2019220b0023179e09608bcb5a77c3d445e53c4cd714b145d6107ae02f2e3d0e2b196c2974b4688ae3e4fc233beb0917da29771795ed08e
e9cf506 ci: Make git available for all merge commits (Hennadii Stepanov) 040e4de scripted-diff: Rename template to avoid CI configuration parsing warning (Hennadii Stepanov) Pull request description: 1) Remove Cirrus CI configuration parsing warning:   2) Make `git` available for merge commits, because it is now required for `depends_sources_cache` and `depends_built_cache`. Top commit has no ACKs. Tree-SHA512: d5cfb49492d2635fc2019220b0023179e09608bcb5a77c3d445e53c4cd714b145d6107ae02f2e3d0e2b196c2974b4688ae3e4fc233beb0917da29771795ed08e
On master (502d22c) the Cirrus CI do not invalidate depends caches when their sources has been changed, i.e. source version updates, a new dependency etc.
This behavior causes:
It is assumed that caches could be invalidated via Cirrus CI API/GUI, but it is inconvenient and it does not work as expected in all cases.
The common part of
fingerprint_key
s for bothdepends_sources_cache
anddepends_built_cache
is the recent commit that changes sources in thesrc/depends
sub-directory.For
depends_built_cache
additionallyCIRRUS_TASK_NAME
is used to avoid sharing of the same cache between tasks with different OSes and differentDEP_OPTS
.The
depends_sources
cache: