rusackas opened a new pull request, #44103: URL: https://github.com/apache/superset/pull/44103
### SUMMARY Publishes `superset-frontend`'s Storybook to [Chromatic](https://www.chromatic.com/) for visual regression testing, using the existing `CHROMATIC_PROJECT_TOKEN` repo secret. **History check before implementing:** Chromatic was actually set up here once before (#21095, 2021) and later removed in #27232 (Feb 2024). The stated reasons were that the workflow was "not maintained anymore" and that it "overlaps with Applitools which is used for visual testing." I checked — Applitools has since also been discontinued (no live references anywhere in the repo, only historical CHANGELOG mentions), so that overlap concern no longer applies. The original setup also went through several `fix:`/"remove chromatic job, it has errors" PRs during its life, which this design tries to avoid repeating: - **Fork-safe by construction, not by extra logic**: GitHub withholds repository secrets from `pull_request` runs triggered by a fork, so `CHROMATIC_PROJECT_TOKEN` is simply empty for those runs. The publish steps guard on `CHROMATIC_PROJECT_TOKEN != ''` and no-op cleanly instead of failing — same pattern `frontend-bundle-size-nightly.yml` already uses for its optional Netlify secret. - **Non-blocking for now** (`exitZeroOnChanges: true`): visual changes surface as a PR check + comment for review, without gating merges. Straightforward to flip to a required check later once the signal is trusted. - **TurboSnap enabled** (`onlyChanged: true`) to keep runs fast given this monorepo's large chart-plugin story set; checkout uses `fetch-depth: 0` so it has the git history TurboSnap needs. - Reuses the existing `superset-node-ci` Docker target and the build-then-mount-output pattern `frontend-bundle-size-nightly.yml` already established, instead of installing Node directly on the runner. - `chromaui/action` is already wildcard-allowlisted in the ASF allowlist (`chromaui/action@*`), so this doesn't interact with #44014 at all. **Manual follow-up needed (can't be done from a PR):** the rich PR-comment experience with inline screenshots comes from the Chromatic GitHub App, which is a separate one-time org-level installation via Chromatic's dashboard (Project → Manage → GitHub), not something `chromaui/action`'s `token` input alone provides. The `token: ${{ secrets.GITHUB_TOKEN }}` input in this workflow already gets a status check + basic PR comment; worth confirming whether the GitHub App is still installed (the project token dates to 2022) for the full experience. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — CI workflow only. ### TESTING INSTRUCTIONS - `pre-commit run --files .github/workflows/chromatic.yml` passes (zizmor clean). - `actionlint` passes, aside from a stale-label false positive on `ubuntu-26.04` (actionlint's bundled runner list hasn't caught up; this label is already used throughout the repo's other workflows) and `$TAG`-quoting notices that are already pervasive in this repo's existing workflows (e.g. `frontend-bundle-size-nightly.yml`, `superset-frontend.yml`). - Fetched the real `apache/infrastructure-actions` `check_asf_allowlist.py` + `approved_patterns.yml`/`actions.yml` and ran it locally against this branch: `chromaui/action@6b31c43... — matches allowlist`, `All 38 unique action refs are on the ASF allowlist`. - Live CI on this PR will exercise the actual publish (same-repo branch, so `CHROMATIC_PROJECT_TOKEN` is available). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
