Skip to content

ci: remove deps debug symbols for smaller caches - #2621

Merged
carneiro-cw merged 2 commits into
mainfrom
remove_debug_symbols
Aug 18, 2026
Merged

ci: remove deps debug symbols for smaller caches#2621
carneiro-cw merged 2 commits into
mainfrom
remove_debug_symbols

Conversation

@carneiro-cw

@carneiro-cw carneiro-cw commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

PR Type

Enhancement


Description

  • Introduce ci profile strips debug symbols

  • Update workflows to use STRATUS_PROFILE=ci

    • Add env var in CI YAML files
    • Use --profile ci in build commands
  • Extend justfile with profile_flag support


Diagram Walkthrough

flowchart LR
  CT["Cargo.toml: add profile ci"]
  JF["justfile: add profile_flag"]
  WF["Workflows: set STRATUS_PROFILE, use --profile ci"]
  CT -- "defines ci profile" --> WF
  CT -- "defines ci profile" --> JF
  JF -- "passes profile_flag" --> WF
Loading

File Walkthrough

Relevant files
Configuration changes
8 files
_setup-e2e.yml
Add STRATUS_PROFILE env var for CI tests                                 
+1/-0     
build-debug-cache.yml
Use `ci` profile in debug cache build                                       
+4/-2     
e2e-contracts-rocks.yml
Add `ci` profile in e2e-contracts-rocks workflow                 
+3/-0     
e2e-leader-fake-leader.yml
Add `ci` profile env in e2e-leader-fake-leader                     
+3/-0     
e2e-leader-follower.yml
Add `ci` profile env in e2e-leader-follower                           
+3/-0     
rust-test.yml
Add `ci` profile env in rust-test workflow                             
+3/-0     
Cargo.toml
Define CI-only profile stripping debug symbols                     
+8/-0     
justfile
Add `profile_flag` for STRATUS_PROFILE in justfile             
+16/-15 

@carneiro-cw
carneiro-cw requested a review from a team as a code owner August 17, 2026 22:01

@cloudwalk-review-agent cloudwalk-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

Looks good: this PR consistently introduces a dedicated ci cargo profile and wires it through CI workflows/just recipes to reduce cache size by stripping dependency debug symbols while preserving debug info for the workspace package. The cache producer (build-debug-cache.yml) and key consumers now align on --profile ci/STRATUS_PROFILE=ci, which is the critical correctness point for cache reuse.

I did not find concrete blocking issues in the provided diff.

@cloudwalk-review-agent cloudwalk-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Follow-up: merge from main — still clean

Reviewed the merge commit (6aaa073). The merge brought in unrelated source changes (src/eth/executor/mod.rs, src/infra/metrics/metrics_definitions.rs) from main, but the PR's CI changes all survived intact.

No new findings. The profile wiring is consistent across all workflows:

  • build-debug-cache.yml builds with --profile ci → consumers restore and use STRATUS_PROFILE=ci
  • [profile.ci] inherits dev with debug = false for deps only — stratus keeps full debug
  • profile_flag in justfile correctly threads --profile ci through all cargo commands including cargo llvm-cov report (which supports --profile)
  • Cache path (target/) covers target/ci/ output directory

Approving.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a96fdc13af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/build-debug-cache.yml
@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Profile Misconfiguration

The new [profile.ci.package."*"] debug = false setting strips debug symbols for all packages including the main stratus binary, which contradicts the PR description stating that stratus should keep full debug info. This may hinder debugging when tests fail or issues arise.

# CI-only profile: strips debug symbols from dependencies to keep the shared
# `stable-release` cache small, while keeping full debug info for stratus itself.
[profile.ci]
inherits = "dev"

[profile.ci.package."*"]
debug = false

@github-actions

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve main binary debug

Add an explicit override for the main stratus package to retain its debug symbols,
since the wildcard pattern strips all debug info including the primary binary
contrary to the comment. Place a [profile.ci.package.stratus] section with debug =
true below the existing package override. This ensures only dependencies are
stripped.

Cargo.toml [267-271]

 [profile.ci]
 inherits = "dev"
 
 [profile.ci.package."*"]
 debug = false
 
+[profile.ci.package.stratus]
+debug = true
+
Suggestion importance[1-10]: 8

__

Why: The wildcard debug = false override strips debug info from all packages including stratus, contradicting the comment. Adding a [profile.ci.package.stratus] debug = true section ensures the main binary retains its debug symbols.

Medium
Remove invalid profile flag

The cargo llvm-cov report command does not accept a Cargo build profile flag, so
{{profile_flag}} should be removed to avoid invalid arguments. Run the report
commands without --profile.

justfile [182-183]

-cargo llvm-cov report {{profile_flag}} --html --ignore-filename-regex data_migration.rs
-cargo llvm-cov report {{profile_flag}} --lcov --output-path target/llvm-cov/reports/rust_tests.info --ignore-filename-regex data_migration.rs
+cargo llvm-cov report --html --ignore-filename-regex data_migration.rs
+cargo llvm-cov report --lcov --output-path target/llvm-cov/reports/rust_tests.info --ignore-filename-regex data_migration.rs
Suggestion importance[1-10]: 7

__

Why: cargo llvm-cov report does not accept a --profile flag, so removing {{profile_flag}} avoids passing invalid arguments and prevents CI failures.

Medium

@carneiro-cw
carneiro-cw enabled auto-merge (squash) August 18, 2026 03:34
@carneiro-cw
carneiro-cw disabled auto-merge August 18, 2026 03:35
@carneiro-cw
carneiro-cw enabled auto-merge (squash) August 18, 2026 03:53
@carneiro-cw
carneiro-cw merged commit 92cc1cd into main Aug 18, 2026
78 of 83 checks passed
@carneiro-cw
carneiro-cw deleted the remove_debug_symbols branch August 18, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants