Skip to content

feat(ci): run plugin-sanity daily for the release branch indexes - #5704

Closed
gustavolira wants to merge 3 commits into
redhat-developer:mainfrom
gustavolira:feat/rhidp-18205-release-plugin-sanity
Closed

gustavolira wants to merge 3 commits into
redhat-developer:mainfrom
gustavolira:feat/rhidp-18205-release-plugin-sanity

Conversation

@gustavolira

@gustavolira gustavolira commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Description

plugin-sanity (cluster-free, e2e-cluster-free.yaml) only ran on main's schedule, against the next catalog index. Release branches could only be checked with a manual workflow_dispatch, which needs admin rights on the repository, so RC and z-stream indexes were never checked automatically. For 2.1.0 it had to be run from a fork (RHIDP-13884).

Release branches on a schedule. GitHub only fires schedule on the default branch. A new release-plugin-sanity job on main's schedule runs dispatch-release-plugin-sanity.sh, which:

  • finds the two newest release-X.Y branches that carry the harness (it stops at the first branch without it, so 1.10 and earlier are skipped);
  • dispatches the workflow on each branch's own ref, so each one runs its own harness against its own backend and plugin-catalog-index:X.Y;
  • waits for those runs (the dispatch API's return_run_details returns the run id) and fails unless all succeed, with each run's conclusion and link in the job summary. Without this, a dispatched run that fails notifies nobody. A failed dispatch or API error fails the job rather than reading as "nothing to check".

plugin-catalog-index:X.Y follows the newest index build of the stream (:2.1 currently resolves to the 2.1-111 digest), so RC and z-stream builds are checked as they land. A manual dispatch with catalog_index_image remains for checking one specific build.

The job needs actions: write for the dispatch, scoped to that job.

I chose not to use a matrix on main that checks out the release refs: main's workflow and backend would boot a release index, a combination that is never shipped.

Four stale excludes removed. homepage, both intelligent-assistant packages (RHDHBUGS-3515) and the keycloak auth provider (RHDHBUGS-3678, closed as obsolete) were excluded because their refs could not be pulled anonymously. The next and 2.1 indexes now pin them by digest, and skopeo inspect --no-creds resolves all four. The two orchestrator excludes (RHIDP-15961) stay. Their notes say what covers them today: the orchestrator E2E in rhdh-plugin-export-overlays, which loads the overlay build, not the index artifact. No rhdh job loads them, and no spec exercises the Loki module.

docs/e2e-tests/local-e2e-harness.md gains a plugin-sanity section. unit/dispatch-release-plugin-sanity.test.ts covers the script with a stub gh on PATH. Each case was seen failing under a mutation of the behaviour it covers.

Which issue(s) does this PR fix

PR acceptance criteria

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

None of this runs on pull_request. Verified from the fork:

Merge #5703 first, otherwise the first scheduled release run fails on that proxy.

🤖 Generated with Claude Code

plugin-sanity only ran on schedule on main, against the next catalog index.
Release branches could only be checked by a manual workflow_dispatch, which
needs repository admin rights, so RC and z-stream indexes were never checked
automatically.

GitHub only fires `schedule` on the default branch, so a new
release-plugin-sanity job on main's schedule dispatches the workflow on the
two newest release-X.Y branches that carry the harness and waits for those
runs, failing if any fails. Each branch runs its own harness against its own
backend and plugin-catalog-index:X.Y tag; mixing main's backend with a
release index would test a combination that is never shipped. The dispatch
API's return_run_details gives the run id to wait on. Branches older than
the harness (1.10 and earlier) stop the search.

Also drop four excludes whose reason no longer holds. homepage, both
intelligent-assistant packages (RHDHBUGS-3515) and the keycloak auth provider
(RHDHBUGS-3678, closed as obsolete) were excluded because their refs could
not be pulled anonymously. The next and 2.1 indexes now pin them by digest
and `skopeo inspect --no-creds` resolves all four. Fork runs with
them enabled passed on main (next index) and on release-2.1 (2.1 index):
https://github.com/gustavolira/rhdh/actions/runs/39851389654
https://github.com/gustavolira/rhdh/actions/runs/39851624217

The two orchestrator excludes (RHIDP-15961) stay, now noting where the
orchestrator backend is covered instead. The harness doc gains a plugin
sanity section.

Part of RHIDP-18205.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gustavolira added a commit to gustavolira/rhdh that referenced this pull request Oct 22, 2026
homepage, both intelligent-assistant packages (RHDHBUGS-3515) and the
keycloak auth provider (RHDHBUGS-3678) were excluded because their refs
could not be pulled anonymously. The 2.1 index now pins them by digest and
`skopeo inspect --no-creds` resolves all four. A fork run on this branch
with them enabled passed:
https://github.com/gustavolira/rhdh/actions/runs/39851624217

The orchestrator excludes (RHIDP-15961) stay, now noting where the
orchestrator backend is covered instead. Same change as on main in redhat-developer#5704.

Part of RHIDP-18205.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

Review fixes on dispatch-release-plugin-sanity.sh:

- has_harness treated every API error as "no harness", so a rate limit or
  5xx on the first branch ended the search and the job exited 0 having
  checked nothing. Only a 404 now means "no harness"; anything else fails.
- A failing branch listing inside the mapfile process substitution was
  swallowed the same way (verified: against a missing repository the old
  script printed "nothing to dispatch" and exited 0). The listing now runs
  in a plain assignment, so set -e catches it.
- Each run is reported with its real conclusion instead of
  success/failure, so a run cancelled by a manual dispatch on the same
  branch (shared concurrency group) shows as cancelled. Anything but
  success still fails the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.04%. Comparing base (b9c0e08) to head (27eca29).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5704      +/-   ##
==========================================
- Coverage   75.70%   73.04%   -2.67%     
==========================================
  Files          65       61       -4     
  Lines         708      575     -133     
  Branches      100       83      -17     
==========================================
- Hits          536      420     -116     
+ Misses        171      154      -17     
  Partials        1        1              
Flag Coverage Δ
rhdh 69.00% <ø> (-6.70%) ⬇️
rhdh-e2e-frontend 72.00% <ø> (?)
Components Coverage Δ
Backend plugins ∅ <ø> (∅)
Backend app 78.94% <ø> (ø)
Frontend app 68.59% <ø> (+7.55%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9c0e08...27eca29. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Script (dispatch-release-plugin-sanity.sh):
- A failed dispatch no longer aborts the script under set -e and leaves
  the runs already dispatched unwatched. It is recorded as "dispatch
  failed", the other runs are still waited on, and the job fails.
- The run id is checked before watching, and a failing `gh run view`
  reports "unknown" instead of ending the job with half a summary.
- The run URL comes from the dispatch response's html_url instead of being
  rebuilt.
- RELEASE_COUNT is an env var with its default in one place, validated as
  a positive integer; the workflow no longer repeats the 2.
- Bash 3 compatible (no mapfile or associative arrays), so the unit test
  runs with /bin/bash on macOS too; the branch listing asks for 100 per page.

Tests: unit/dispatch-release-plugin-sanity.test.ts drives the script with a
stub gh on PATH: default count, stop at the first branch without the
harness, nothing to dispatch, API error vs 404, failed conclusion, failed
dispatch, and RELEASE_COUNT validation. Each case was seen failing under a
mutation of the behaviour it covers.

Docs: the X.Y index tag follows the newest build of the stream (plugin-
catalog-index:2.1 currently resolves to the 2.1-111 digest), so RC builds
are covered by the schedule; a manual dispatch is for one specific build.
The doc now says the job fails unless all runs succeed, "up to two"
branches, and that manual and scheduled dispatches on a branch cancel each
other. The loki exclude notes its coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gustavolira added a commit to gustavolira/rhdh that referenced this pull request Oct 22, 2026
Same wording as on main in redhat-developer#5704.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@gabemontero

Copy link
Copy Markdown
Contributor

@gustavolira the openshift-ci bot did its random assigning of reviewers and selected me, but I have no prior context for ci in this repo - you may want to tag someone from git history for the changed files

@gustavolira

Copy link
Copy Markdown
Member Author

Closing: the release plugin sanity check is moving to rhdh-plugin-export-overlays, where one workflow will check every catalog index and community plugin in the real RHDH image of a release (including RCs). The rhdh plugin sanity checks will be removed once that workflow is in place, so this change is no longer needed.

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