Skip to content

ci: Update cache key for packages-build in CI workflow#40101

Merged
ggazzo merged 1 commit intodevelopfrom
ggazzo-patch-1
Apr 9, 2026
Merged

ci: Update cache key for packages-build in CI workflow#40101
ggazzo merged 1 commit intodevelopfrom
ggazzo-patch-1

Conversation

@ggazzo
Copy link
Copy Markdown
Member

@ggazzo ggazzo commented Apr 9, 2026

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

ARCH-2085

Summary by CodeRabbit

  • Chores
    • Optimized internal build caching mechanisms to improve build reliability and efficiency.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Apr 9, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

⚠️ No Changeset found

Latest commit: adfda92

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ggazzo ggazzo added this to the 8.4.0 milestone Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Walkthrough

The CI workflow's cache key strategy for the packages-build artifact was updated to use the source archive hash instead of the previously computed packages build hash for cache invalidation.

Changes

Cohort / File(s) Summary
CI Workflow Cache Configuration
.github/workflows/ci.yml
Changed cache key from packages-build-cache-key to source-hash for the packages-build artifact, updating the basis for cache invalidation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the cache key for packages-build in the CI workflow, which matches the .github/workflows/ci.yml modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ggazzo ggazzo marked this pull request as ready for review April 9, 2026 14:38
@ggazzo ggazzo requested a review from a team as a code owner April 9, 2026 14:38
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Apr 9, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 9, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge April 9, 2026 14:40
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

190-194: ⚠️ Potential issue | 🟡 Minor

Align cache observability with the new cache key.

After Line 188 switched to source-hash, Line 194 still prints packages-build-cache-key, which makes cache diagnostics misleading.

Proposed patch
       - name: Cache observability (packages-build)
         run: |
           echo "### 📦 packages-build cache" >> $GITHUB_STEP_SUMMARY
           echo "- **hit**: \`${{ steps.packages-cache-build.outputs.cache-hit }}\`" >> $GITHUB_STEP_SUMMARY
-          echo "- **key**: \`${{ needs.release-versions.outputs.packages-build-cache-key }}\`" >> $GITHUB_STEP_SUMMARY
+          echo "- **key**: \`${{ needs.release-versions.outputs.source-hash }}\`" >> $GITHUB_STEP_SUMMARY
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 190 - 194, The cache observability
block prints the old cache key variable
(needs.release-versions.outputs.packages-build-cache-key) which is now incorrect
after switching to the new `source-hash`; update the echo that prints the key in
the "Cache observability (packages-build)" step to use the new output name
(needs.release-versions.outputs.source-hash) so the summary shows the actual key
being used, and leave the cache-hit line
(steps.packages-cache-build.outputs.cache-hit) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 190-194: The cache observability block prints the old cache key
variable (needs.release-versions.outputs.packages-build-cache-key) which is now
incorrect after switching to the new `source-hash`; update the echo that prints
the key in the "Cache observability (packages-build)" step to use the new output
name (needs.release-versions.outputs.source-hash) so the summary shows the
actual key being used, and leave the cache-hit line
(steps.packages-cache-build.outputs.cache-hit) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4eaa13c3-dc38-48e1-a9f6-fe49f0c86724

📥 Commits

Reviewing files that changed from the base of the PR and between b490ed5 and adfda92.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: Rocket.Chat repo context: When a workspace manifest on develop already pins a dependency version (e.g., packages/web-ui-registration → "rocket.chat/ui-contexts": "27.0.1"), a lockfile change in a feature PR that upgrades only that dependency’s resolution is considered a manifest-driven sync and can be kept, preferably as a small "chore: sync yarn.lock with manifests" commit.
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: In Rocket.Chat PRs, keep feature PRs free of unrelated lockfile-only dependency bumps; prefer reverting lockfile drift or isolating such bumps into a separate "chore" commit/PR, and always use yarn install --immutable with the Yarn version pinned in package.json via Corepack.
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

188-188: Cache key migration to source-hash is a solid fix.

Line 188 now invalidates packages-build cache on source changes, which avoids stale build artifact reuse.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/ci.yml">

<violation number="1" location=".github/workflows/ci.yml:188">
P2: The cache summary now prints a different key than the one used for the `packages-build` cache, which makes cache-hit debugging misleading.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread .github/workflows/ci.yml
path: |
/tmp/RocketChat-packages-build.tar.gz
key: ${{ runner.arch }}-${{ runner.os }}-packages-build-${{ needs.release-versions.outputs.packages-build-cache-key }}
key: ${{ runner.arch }}-${{ runner.os }}-packages-build-${{ needs.release-versions.outputs.source-hash }}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The cache summary now prints a different key than the one used for the packages-build cache, which makes cache-hit debugging misleading.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 188:

<comment>The cache summary now prints a different key than the one used for the `packages-build` cache, which makes cache-hit debugging misleading.</comment>

<file context>
@@ -185,7 +185,7 @@ jobs:
           path: |
             /tmp/RocketChat-packages-build.tar.gz
-          key: ${{ runner.arch }}-${{ runner.os }}-packages-build-${{ needs.release-versions.outputs.packages-build-cache-key }}
+          key: ${{ runner.arch }}-${{ runner.os }}-packages-build-${{ needs.release-versions.outputs.source-hash }}
 
       - name: Cache observability (packages-build)
</file context>
Fix with Cubic

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.12%. Comparing base (b490ed5) to head (adfda92).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40101      +/-   ##
===========================================
+ Coverage    70.11%   70.12%   +0.01%     
===========================================
  Files         3273     3273              
  Lines       116237   116237              
  Branches     20580    20610      +30     
===========================================
+ Hits         81497    81514      +17     
+ Misses       31437    31420      -17     
  Partials      3303     3303              
Flag Coverage Δ
unit 70.94% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ggazzo ggazzo disabled auto-merge April 9, 2026 14:50
@ggazzo ggazzo merged commit 85f001c into develop Apr 9, 2026
24 checks passed
@ggazzo ggazzo deleted the ggazzo-patch-1 branch April 9, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants