You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review follow-ups on the nightly coverage swap:
- Extract toCoverageImageRef() so the `:(tag)__coverage` rewrite (and the
greedy-up-to-! regex) lives in one documented place instead of being
duplicated across PR mode and nightly resolution.
- Hoist the workspace-root resolution to a single workspaceRoot const
(was computed twice).
- Document the new behavior per the repo convention: a changelog entry,
an E2E_NIGHTLY_COVERAGE row in the environment-variables reference, and
a coverage-swap section in plugin-metadata-resolution.
No behavior change; full suite still passes (yarn check + tests green).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/changelog.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
7
7
### Added
8
8
9
9
-**E2E coverage collection auto-fixture**: New `_coverageCollector` automatic fixture collects Istanbul coverage (`window.__coverage__`) from the browser after each test and writes per-test JSON files to `<outputDir>/coverage/`. Enabled via `E2E_COLLECT_COVERAGE=true`. Zero overhead when disabled — no `page.evaluate` call or fs operations. Designed for use with instrumented dynamic plugin builds (nyc instrument).
10
+
-**Nightly coverage image swap** (`E2E_NIGHTLY_COVERAGE`): In nightly plugin resolution, an explicit opt-in swaps a rolled-out frontend plugin (workspace with a `coverage-anchors/` directory) from its released OCI image to the instrumented `__coverage` variant, so a coverage-dedicated nightly run can collect browser coverage. Gated separately from the ambient `E2E_COLLECT_COVERAGE` so the functional nightly's resolution is unchanged; `{{inherit}}` (DPDY) plugins are never swapped.
|`GIT_PR_NUMBER`| PR number (set by OpenShift CI) | Enables OCI URL generation for PR builds |
50
50
|`E2E_NIGHTLY_MODE`| When `"true"`, activates nightly mode | Plugins in `default.packages.yaml` with OCI metadata use `{{inherit}}` (RHDH resolves both OCI tag and config from DPDY); other OCI plugins use full metadata refs with config injection |
51
+
|`E2E_NIGHTLY_COVERAGE`| When `"true"`, opt into the nightly coverage image swap | In nightly resolution, a rolled-out frontend plugin (workspace has `coverage-anchors/`) gets its released OCI tag swapped to the instrumented `__coverage` variant so the run can collect browser coverage. Off by default — the functional nightly is unaffected; `{{inherit}}` plugins are never swapped |
51
52
|`RHDH_SKIP_PLUGIN_METADATA_INJECTION`| When `"true"`, disables metadata injection | Local-only opt-out (ignored when `CI=true`) |
52
53
|`RELEASE_BRANCH_NAME`| Release branch (set by OpenShift CI step registry) | Used to fetch `default.packages.yaml` for DPDY resolution in nightly mode. Required in CI, defaults to `main` locally |
53
54
|`NIGHTLY_DPDY_OCI_REGISTRY`| OCI registry for `{{inherit}}` refs | Overrides default `registry.access.redhat.com/rhdh` for all plugins using `{{inherit}}` in nightly mode |
Metadata is the source of truth for the package reference, except for plugins in `default.packages.yaml` with OCI metadata in nightly mode — these use `{{inherit}}` so RHDH resolves both the OCI tag and config from its built-in DPDY, testing the exact versions and configuration shipped in the RC.
119
123
124
+
### Coverage image swap (`E2E_NIGHTLY_COVERAGE`)
125
+
126
+
A nightly run can only collect browser coverage if RHDH deploys the **instrumented** `__coverage` plugin image (built by the overlay release publish). When `E2E_NIGHTLY_COVERAGE=true`, step 4 above swaps a rolled-out frontend plugin's released OCI tag to its `__coverage` variant.
127
+
128
+
This is a separate flag from the ambient `E2E_COLLECT_COVERAGE` (which only toggles the collector fixture) on purpose: the functional nightly runs with `E2E_COLLECT_COVERAGE=true` by default, and the `__coverage` variant is built non-fatally, so swapping there could point at a tag that doesn't exist and break the deployment. The explicit `E2E_NIGHTLY_COVERAGE` opt-in keeps the functional nightly's resolution unchanged; only a coverage-dedicated run (which ensures the images exist) sets it. Plugins resolved via `{{inherit}}` are never swapped — those are RHDH's catalog images, which can't be instrumented.
129
+
120
130
## Resolution Scenarios
121
131
122
132
The tables below show what happens to each plugin type in PR check and nightly modes. Local dev behaves the same as PR check (metadata refs + full config injection).
0 commit comments