Skip to content

chore: delete ci-js-deps artifact after all consumers finish#30307

Merged
tommasini merged 2 commits into
mainfrom
chore/cleanup-ci-js-deps-artifact
May 21, 2026
Merged

chore: delete ci-js-deps artifact after all consumers finish#30307
tommasini merged 2 commits into
mainfrom
chore/cleanup-ci-js-deps-artifact

Conversation

@tommasini

@tommasini tommasini commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a cleanup-ci-js-deps job that deletes the ci-js-deps workflow artifact via the GitHub REST API once all consumers have finished.
  • The artifact is ~635 MB and was previously retained for the full retention-days: 1 minimum. With 30+ PRs/day this accumulates ~19+ GB of live artifact storage at any given time, none of which is ever reused (every push re-creates it from scratch).
  • The cleanup job runs with if: always() so it fires on pass, fail, and the merge_group case where merge-unit-and-component-view-tests is skipped.
  • Guarded by inputs.runner_provider != 'namespace' — same condition as the upload/download steps. On Namespace runners the artifact is never created so there is nothing to clean up.
  • This is a TEMP fix like the upload/download steps themselves; all four should be removed together once Namespace becomes the default runner.

How it works

prepare-ci-js-deps  →  unit-tests (×10)        ↘
                    →  component-view-tests (×2) → merge-unit-and-component-view-tests
                                                          ↓
                                                 cleanup-ci-js-deps  ← deletes artifact

The artifact now lives only for the duration of the CI run (~20–40 min) instead of up to 24 hours.

Test plan

  • Verify the cleanup-ci-js-deps job appears in the Actions run after unit/CV tests and merge job complete
  • Confirm the ci-js-deps artifact is absent from the run's artifact list after the cleanup job finishes
  • Confirm that a failed unit-test shard does not prevent the cleanup job from running (if: always())
  • Confirm that on a merge_group event (where merge-unit-and-component-view-tests is skipped) the cleanup job still runs

Made with Cursor


Note

Low Risk
Low risk CI-only change; main failure mode is the new artifact-deletion step lacking permissions or not finding the artifact, which could cause an extra job to fail without affecting product code.

Overview
Reduces GitHub Actions artifact storage by adding a temporary cleanup-ci-js-deps job that, on non-Namespace runs, uses actions/github-script to find and delete the ci-js-deps artifact after unit-tests, component-view-tests, and merge-unit-and-component-view-tests complete (runs even on failures via always()).

Reviewed by Cursor Bugbot for commit c689475. Bugbot is set up for automated code reviews on this repo. Configure here.

Every push re-creates the ci-js-deps artifact from scratch so there is
no cross-run reuse benefit. Keeping it for the full retention-days: 1
window accumulates ~635 MB × 30+ PRs/day (~19+ GB) of live artifact
storage unnecessarily.

A dedicated cleanup-ci-js-deps job runs after all consumers (unit-tests,
component-view-tests, merge-unit-and-component-view-tests) with
if: always() so it fires on pass, fail, and skip (e.g. merge_group
skips the merge job). The artifact is deleted via the GitHub REST API,
reducing its live duration from up to 24 h to the length of the CI run.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@tommasini tommasini marked this pull request as ready for review May 19, 2026 20:49
@tommasini tommasini requested a review from a team as a code owner May 19, 2026 20:49
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 97%
click to see 🤖 AI reasoning details

E2E Test Selection:
The only changed file is .github/workflows/ci.yml, and the diff shows a single new job cleanup-ci-js-deps being added. This job is purely a CI housekeeping/infrastructure change that:

  1. Deletes a CI artifact (ci-js-deps) after its consumers (unit-tests, component-view-tests, merge-unit-and-component-view-tests) have finished — purely to save GitHub artifact storage space.
  2. Does not modify any test execution logic — no E2E test steps, no build steps, no test configuration changes.
  3. Does not touch any app source code — no controllers, components, navigation, or any user-facing functionality.
  4. Is conditional — only runs when inputs.runner_provider != 'namespace' (temporary until Namespace becomes the default runner).
  5. Has no cascade effects on E2E tests or performance.

Since this change has zero impact on app behavior, user flows, or test infrastructure that runs E2E tests, no E2E test tags need to be run.

Performance Test Selection:
The change is a CI artifact cleanup job with no impact on app code, rendering, state management, or any user-facing functionality. No performance tests are warranted.

View GitHub Actions results

@Cal-L Cal-L left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c689475. Configure here.

Comment thread .github/workflows/ci.yml
@sonarqubecloud

Copy link
Copy Markdown

@tommasini tommasini added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label May 19, 2026
@metamaskbotv2 metamaskbotv2 Bot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 19, 2026
@tommasini tommasini added the team-mobile-platform Mobile Platform team label May 20, 2026
@tommasini tommasini added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit afde4b1 May 21, 2026
120 of 131 checks passed
@tommasini tommasini deleted the chore/cleanup-ci-js-deps-artifact branch May 21, 2026 11:55
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-S team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants