ci: Invalidate depends caches when sources have been changed#22710
Merged
maflcko merged 2 commits intobitcoin:masterfrom Aug 19, 2021
Merged
ci: Invalidate depends caches when sources have been changed#22710maflcko merged 2 commits intobitcoin:masterfrom
maflcko merged 2 commits intobitcoin:masterfrom
Conversation
maflcko
reviewed
Aug 16, 2021
Member
|
Concept ACK |
beac4f8 to
93f3427
Compare
Contributor
|
Approach ACK |
Member
Author
|
CI is green, and this PR is ready for reviewing :) |
Contributor
|
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. |
laanwj
reviewed
Aug 18, 2021
.cirrus.yml
Outdated
| folder: "/tmp/ccache_dir" | ||
| depends_built_cache: | ||
| folder: "depends/built" | ||
| fingerprint_script: echo $CIRRUS_TASK_NAME $(git log -1 --oneline ./depends) |
Member
There was a problem hiding this comment.
Might use git rev-list -1 HEAD ./depends here; this prints only the (full, independent of core.abbrev) commit hash.
Member
Author
|
Updated 93f3427 -> f52a72a (pr22710.04 -> pr22710.05, diff): |
Member
|
cr ACK f52a72a |
Zero-1729
reviewed
Aug 19, 2021
maflcko
pushed a commit
that referenced
this pull request
Aug 20, 2021
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
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Aug 20, 2021
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Aug 20, 2021
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
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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_keys for bothdepends_sources_cacheanddepends_built_cacheis the recent commit that changes sources in thesrc/dependssub-directory.For
depends_built_cacheadditionallyCIRRUS_TASK_NAMEis used to avoid sharing of the same cache between tasks with different OSes and differentDEP_OPTS.The
depends_sourcescache: