Skip to content

ci: skip new files in storage layout checks#1049

Closed
absalonCRC wants to merge 1 commit into
ubiquity:developmentfrom
absalonCRC:ci/skip-new-storage-layout-targets
Closed

ci: skip new files in storage layout checks#1049
absalonCRC wants to merge 1 commit into
ubiquity:developmentfrom
absalonCRC:ci/skip-new-storage-layout-targets

Conversation

@absalonCRC

Copy link
Copy Markdown

Resolves #972

Summary

  • Restricts both storage-check matrices to Solidity files reported by tj-actions/changed-files as modified, not all changed files.
  • Leaves newly added core contracts and Lib*.sol libraries out of the storage-check matrix, avoiding baseline artifact lookup for files that cannot have prior storage artifacts.
  • Keeps edited existing contracts/libraries covered by the existing foundry-storage-check jobs.

Why this approach

The storage checker compares against artifacts from the base branch. A newly added file cannot have a base-branch storage artifact, which is what produces the No workflow run found with an artifact named... failure. Using the action's *_modified_files outputs keeps the check focused on files that existed before and avoids adding a fragile base-ref lookup to the workflow.

QA

Scenario Expected result
No storage updates / no in-scope modified files CI passes; matrix output is empty and the storage job is skipped.
Existing storage update without collision CI passes; modified file remains in the matrix and the storage checker runs.
Existing storage update with collision CI fails; modified file remains in the matrix and the storage checker runs.
New contract or library added CI passes; added files are absent from *_modified_files, so no missing baseline artifact is requested.

Validation

  • Parsed both modified workflow YAML files locally with Ruby YAML.load_file.
  • Ran git diff --check.
  • Verified tj-actions/changed-files@v42 defines the modified_files output used here.

@absalonCRC absalonCRC requested a review from rndquu as a code owner June 13, 2026 20:58
@ubiquity-os ubiquity-os Bot closed this Jun 13, 2026
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06634dd4-b795-46d4-9f8e-7dbf26bddd0d

📥 Commits

Reviewing files that changed from the base of the PR and between be9e35e and 3dab7ee.

📒 Files selected for processing (2)
  • .github/workflows/core-contracts-storage-check.yml
  • .github/workflows/diamond-storage-check.yml

📝 Walkthrough

Walkthrough

Two GitHub Actions workflows were updated to narrow their job matrices. core-contracts-storage-check now sets CHANGED_CONTRACTS from the contracts_modified_files output instead of all changed contract files. Similarly, diamond-storage-check sets CHANGED_LIBS from libraries_modified_files instead of all changed library files. Both use a conditional check to only run the matrix step when modified files are detected, preventing failures when new contracts or libraries are added without existing storage baselines.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: restricting storage layout checks to modified files instead of all changed files, which effectively skips new files.
Description check ✅ Passed The description includes the required issue link, detailed summary, rationale, QA scenarios, and validation steps. All essential information is present and well-structured.
Linked Issues check ✅ Passed The code changes fully address issue #972 by restricting matrices to modified files instead of all changed files, preventing failures on newly added contracts and libraries.
Out of Scope Changes check ✅ Passed Both workflow file changes are directly scoped to the storage layout check matrices and precisely implement the required behavior with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

CI: fix check_storage_layout for new contracts

1 participant