Skip to content

Comments

chore: unify rust caches#1994

Merged
ananas-block merged 2 commits intomainfrom
jorrit/chore-unify-rust-caches
Oct 15, 2025
Merged

chore: unify rust caches#1994
ananas-block merged 2 commits intomainfrom
jorrit/chore-unify-rust-caches

Conversation

@ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Oct 15, 2025

Summary by CodeRabbit

  • Chores
    • Replaced legacy cache input with a unified cache-key across CI workflows to standardize caching behavior.
    • Consolidated cache configuration for toolchain setup to improve reuse and reduce redundant downloads.
    • Expanded component skipping to include the Go step where configured, and added a guard to skip Go setup when requested.
    • Harmonized setup-and-build steps across workflows for more consistent and reliable CI runs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Replaced the reusable action and workflows' cache-suffix input with cache-key (default "shared") and updated callers to pass cache-key. Added conditional guard so the Go setup step is skipped when skip-components includes "go". No other control-flow changes.

Changes

Cohort / File(s) Summary
Reusable action: setup-and-build
.github/actions/setup-and-build/action.yml
Renamed/removed public input cache-suffix in favor of cache-key (default "shared"). Updated Rust toolchain setup to use inputs.cache-key and simplified workspace cache mapping. Added conditional around Go setup to respect skip-components.
Workflows invoking setup-and-build
.github/workflows/cli-v1.yml, .github/workflows/cli-v2.yml, .github/workflows/forester-tests.yml, .github/workflows/js.yml, .github/workflows/js-v2.yml, .github/workflows/rust.yml, .github/workflows/sdk-tests.yml, .github/workflows/lint.yml
Call sites updated to pass cache-key: "<value>" instead of cache-suffix: "<value>". Most callers also appended "go" to skip-components lists. No other step logic changed.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Runner as GitHub Runner
  participant WF as Workflow Job
  participant Act as setup-and-build Action
  participant Rust as Rust Toolchain Setup
  participant Go as Go Setup Step
  participant Cache as Cache Backend

  Runner->>WF: trigger workflow
  WF->>Act: invoke action (inputs: cache-key, skip-components)
  Act->>Rust: setup rust (use inputs.cache-key to restore/save cache)
  Rust->>Cache: restore cache using cache-key
  Cache-->>Rust: cache hit/miss
  Rust-->>Act: rust ready
  alt skip-components does not include "go"
    Act->>Go: run Go setup
    Go-->>Act: go ready
  else skip-components includes "go"
    Note right of Act: Go setup skipped per inputs.skip-components
  end
  Act-->>WF: continue build steps
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I nibbled YAML in the night,
Swapped suffixes for a shared-key light,
Skipping Go where roots take flight—
Caches pooled, the burrow's bright.
Hop on, CI: the pipeline's tight. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “chore: unify rust caches” is too narrow because the changeset replaces the cache-suffix input with cache-key and updates skip-components across multiple workflows (JS, Go, lint, SDK tests, etc.), not just Rust. It fails to convey the broader refactoring of caching configurations and may mislead reviewers about the scope of the pull request. Please update the title to reflect the overall change scope, for example “chore: replace cache-suffix with cache-key across workflows” or “chore: unify caching inputs in GitHub Actions” to clearly describe the main update.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jorrit/chore-unify-rust-caches

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f372ba9 and e0e98f6.

📒 Files selected for processing (9)
  • .github/actions/setup-and-build/action.yml (2 hunks)
  • .github/workflows/cli-v1.yml (1 hunks)
  • .github/workflows/cli-v2.yml (1 hunks)
  • .github/workflows/forester-tests.yml (1 hunks)
  • .github/workflows/js-v2.yml (1 hunks)
  • .github/workflows/js.yml (1 hunks)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/rust.yml (1 hunks)
  • .github/workflows/sdk-tests.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/sdk-tests.yml
  • .github/workflows/forester-tests.yml
  • .github/workflows/js-v2.yml
  • .github/workflows/cli-v1.yml
⏰ 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). (9)
  • GitHub Check: Test program-libs-fast
  • GitHub Check: stateless-js-v2
  • GitHub Check: Test batched-merkle-tree-simulate
  • GitHub Check: Test program-libs-slow
  • GitHub Check: cli-v2
  • GitHub Check: stateless-js-v1
  • GitHub Check: lint
  • GitHub Check: cli-v1
  • GitHub Check: Forester e2e test

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.

@ananas-block ananas-block force-pushed the jorrit/chore-unify-rust-caches branch from 1c78a3c to f372ba9 Compare October 15, 2025 16:24
@ananas-block ananas-block merged commit 65c85ab into main Oct 15, 2025
20 of 22 checks passed
@ananas-block ananas-block deleted the jorrit/chore-unify-rust-caches branch October 15, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants