-
Notifications
You must be signed in to change notification settings - Fork 174
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
ci: Use correct keys for the gitlab caches #4008
Conversation
WalkthroughRefined the caching configuration, we have. In the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (11)
🔇 Additional comments (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.gitlab-ci.yml (2)
196-199
: Improved, the cache key configuration has been, hmmmm.More precise cache identification, this change brings. Using
HEAD_REF
andHEAD_SHA
, better granularity in caching mechanism, we achieve. Wise choice, it is, to fall back to branch-level cache withHEAD_REF
alone.Benefits, this change brings:
- Per-commit cache specificity, we gain
- Branch-level fallback, we maintain
- Cache pollution between branches, we prevent
196-199
: Consistency in cache keys across all jobs, maintain we should.Notice I do, that other jobs like
build_exatrkx
,build_exatrkx_cpu
,.linux_ubuntu_extra
, and.lcg_base_job
, still use the old cache key format. Harmonize the cache configuration across all jobs, we must.Apply this pattern to other jobs as well:
cache: - key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX} + key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${HEAD_REF}-${HEAD_SHA} fallback_keys: - - ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX} + - ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${HEAD_REF}-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.gitlab-ci.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: macos
- GitHub Check: linux_ubuntu_extra (ubuntu2204_clang, 20)
- GitHub Check: linux_ubuntu_extra (ubuntu2204, 20)
- GitHub Check: linux_ubuntu
- GitHub Check: build_debug
@andiwand let's wait to merge this until I've seen it run. |
Invalidated by push of 4b6f014
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.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
.gitlab-ci.yml (1)
Line range hint
189-229
: Active job, same weakness it has.In the active build job, the same issue persists. At line 214,
HEAD_SHA
variable undefined it is:- - git checkout $HEAD_SHA + - git checkout $CI_COMMIT_SHA
🧹 Nitpick comments (1)
.gitlab-ci.yml (1)
230-445
: Wisdom about the path forward, share I must.Throughout the pipeline, a pattern of issues I see:
- Undefined variables (
HEAD_REF
,HEAD_SHA
) used consistently they are- Many jobs commented out they are, yet share the same weakness
A path to improvement, suggest I do:
- Define these variables in the pipeline configuration, you must
- Or migrate to standard GitLab CI variables across all jobs, you should
- Before uncommenting jobs, fix these issues you must
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.gitlab-ci.yml
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: merge-sentinel
🔇 Additional comments (1)
.gitlab-ci.yml (1)
9-18
: Undefined in the Force, these variables are. A disturbance, I sense.The cache configuration template uses undefined variables:
HEAD_REF
andHEAD_SHA
, defined they are not- Standard GitLab CI variables, they are not
- Risk of cache failures, there is
Recommend using standard GitLab CI variables:
- - key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${HEAD_REF}-${HEAD_SHA} - fallback_keys: - - ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${HEAD_REF}- - - ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-main- + - key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} + fallback_keys: + - ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${CI_COMMIT_REF_NAME}- + - ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-main-
Ok this seems to be working now. Can you go again @andiwand? |
Quality Gate passedIssues Measures |
--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat
,fix
,refactor
,docs
,chore
andbuild
types.Summary by CodeRabbit
.gitlab-ci.yml
from checks in the YAML validation process.