Skip to content

test: validate E2E coverage infrastructure#2550

Closed
gustavolira wants to merge 13 commits into
redhat-developer:mainfrom
gustavolira:test/validate-coverage-infrastructure
Closed

test: validate E2E coverage infrastructure#2550
gustavolira wants to merge 13 commits into
redhat-developer:mainfrom
gustavolira:test/validate-coverage-infrastructure

Conversation

@gustavolira

Copy link
Copy Markdown
Member

Purpose

This PR validates the E2E coverage collection pipeline implemented in #2383.

What This Tests

  1. Image Instrumentation: instrument job creates __coverage tagged OCI images
  2. Coverage Collection: E2E tests collect browser-side coverage via Istanbul
  3. Codecov Upload: Coverage data uploads to upstream repo with proper attribution

Test Plan

  1. Comment /publish to trigger plugin build
  2. Verify instrument job completes successfully
  3. Check that coverage images are published to GHCR
  4. Monitor coverage upload to Codecov
  5. Validate coverage appears in upstream backstage/community-plugins repo

Expected Artifacts

  • Production image: ghcr.io/.../backstage-community-plugin-tech-radar:pr_XXXX__1.1.0
  • Coverage image: ghcr.io/.../backstage-community-plugin-tech-radar:pr_XXXX__1.1.0__coverage
  • Codecov flag: e2e-tech-radar

Status

⏳ Awaiting /publish command


Note: This PR will be closed without merge after validation completes.

This PR validates the E2E coverage collection pipeline added in redhat-developer#2383:
- Instrument job creates coverage-tagged OCI images
- E2E tests collect browser coverage via Istanbul
- Coverage uploads to Codecov with upstream repo attribution

Will be closed without merge after validation.
@openshift-ci

openshift-ci Bot commented Jun 3, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.10 | Duration: 6m 16s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

gashcrumb pushed a commit that referenced this pull request Jun 3, 2026
…2551)

fix: provide dummy command to podman create for static plugin images

Plugin OCI images are static file bundles with no CMD or ENTRYPOINT.
Running 'podman create' without a command argument fails with:
  Error: no command or entrypoint provided, and no CMD or ENTRYPOINT from image

Fix: Pass /bin/true as a dummy command. The container is never run,
just created so we can extract files with podman cp.

Fixes instrumentation job failure on PR #2550.
Ref: https://github.com/redhat-developer/rhdh-plugin-export-overlays/actions/runs/26902663501
@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.10 | Duration: 5m 10s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@github-actions github-actions Bot added mandatory-workspace PR affects a workspace with required plugins for releases workspace-update PR modifies files in an existing workspace labels Jun 3, 2026
@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 35s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 26s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

Version 2.1.0 includes the automatic __coverage image swap logic
from PR redhat-developer/rhdh-e2e-test-utils#95 (merged 2026-06-04).

Changes:
- Auto-fixture _coverageCollector that collects window.__coverage__
- Automatic swap to __coverage images when E2E_COLLECT_COVERAGE=true
  and plugin role is frontend-plugin

This enables E2E coverage collection to work end-to-end.
@gustavolira gustavolira force-pushed the test/validate-coverage-infrastructure branch from cec1468 to c94b35f Compare June 4, 2026 21:49
@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 53s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 29s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 32s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 48s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

The __coverage image only instrumented the Module Federation bundle (dist/),
but RHDH can serve/execute the Scalprum bundle (dist-scalprum/) at runtime,
which was left uninstrumented — so window.__coverage__ was never created even
though the image looked correctly instrumented.

Verified by pulling pr_2550__1.17.0__coverage: dist/ had 208 instrumented files
with the globalThis fix and a top-level cov_() call in remoteEntry.js, while
dist-scalprum/ had zero. The MF container global was present on the page's
globalThis but __coverage__ was not, confirming the executed bundle was not the
instrumented one.

Changes:
- instrument-plugin.sh: loop over dist/ and dist-scalprum/, instrument every
  bundle that exists, overlay all via generated COPY lines. Warn loudly if the
  globalThis sed fix leaves any unfixed `new Function("return this")`.
- instrument-plugin.sh: fix OCI dynamic-packages label parse — the dir path is
  the object key ([{"<dir>": {"name": ...}}]), not a top-level `name` field. The
  old `.[0].name` returned empty and only worked via the metadata fallback.
- tech-radar.spec.ts: add a coverage-mode-only diagnostic probe that fetches the
  served MF remoteEntry.js and the Scalprum bundle and logs whether each carries
  Istanbul markers, so the served-vs-instrumented question is answered directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 58s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 34s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

…ted code

RHDH's install-dynamic-plugins only extracts manifest.layers[0] — it assumes
dynamic-plugin OCI images are single-layer (image-cache.ts: "keeps each OCI
image's single-layer tarball"). Building the coverage image as `FROM prod +
COPY` produced a multi-layer image whose FIRST layer is the original
uninstrumented base, so RHDH served the original code and ignored our
instrumented overlay layers — window.__coverage__ was never created.

Fix: build with `podman build --squash-all` so the result is a single layer
containing the merged instrumented filesystem; assert single-layer afterward.

Verified locally by replicating RHDH's exact extraction (skopeo copy →
extract layers[0] only): the main scalprum bundle in layers[0] goes from
24,028 B (original) without squash to 290,210 B (instrumented) with --squash-all.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavolira

Copy link
Copy Markdown
Member Author

/publish

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Publish workflow has completed with success.

Publishing process

✅ Finished successfully.

  • Published container images:
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar:pr_2550__1.17.0
    • ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tech-radar-backend:pr_2550__1.16.0

Backstage Compatibility Check

✅ All workspaces are compatible with the target Backstage version (1.49.4).

No action required.

Metadata Validation

✅ All metadata files validated successfully.

Running e2e tests
/test e2e-ocp-helm

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Smoke tests workflow passed. All plugins loaded successfully.

@rhdh-test-bot

Copy link
Copy Markdown

✅ Passed E2E Tests - tech-radar

Platform: ocp 4.18 | RHDH Version: 1.11 | Duration: 5m 38s
Passed: 2 | Failed: 0 | Flaky: 0 | Skipped: 0
Playwright Report | Build Log | Logs | Artifacts

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress mandatory-workspace PR affects a workspace with required plugins for releases needs-rebase workspace-update PR modifies files in an existing workspace

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants