feat(e2e-version): replace React 19 preview image with version + feature toggles#239
Open
mckn wants to merge 2 commits into
Open
feat(e2e-version): replace React 19 preview image with version + feature toggles#239mckn wants to merge 2 commits into
mckn wants to merge 2 commits into
Conversation
…ure toggles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Source the feature-toggle variant list from a JSON file on main, fetched at runtime, so variants can be added/removed by merging a PR without requiring consumers to bump the pinned action version. Falls back to skipping variants (with a warning) if the fetch fails. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
React 19 testing previously relied on a dedicated
dev-preview-react19image tag — a bespoke, separately-published image. This created a hard coupling to an image that exists outside the normal Grafana release process.Instead, React 19 should be tested against a real Grafana release with the
react19feature toggle enabled viaGF_FEATURE_TOGGLES_ENABLE.What changed
New
enabledTogglesfield on every matrix item — a comma-separated string of Grafana feature toggles to enable for that run (empty string when none). Pass it to Grafana via theGF_FEATURE_TOGGLES_ENABLEenvironment variable.Feature-toggle variants are fetched remotely. The list of variants (which Grafana minor + which toggles) is not baked into the action. It is fetched at runtime from
feature-toggle-variants.jsonon themainbranch:The file is a JSON object keyed by Grafana minor version (
major.minor):{ "13.1": { "name": "grafana-enterprise", "enabledToggles": "react19" } }To add or remove a variant, merge a PR that edits this file on
main. The change takes effect for all consumers immediately — regardless of which action version they have pinned — without cutting a new action release or asking consumers to bump their pinned ref. (The GitHub raw CDN means changes can take a few minutes to propagate.)If the file cannot be fetched (network error, non-2xx, or malformed JSON), the action logs a warning and skips the feature-toggle variants; the rest of the matrix is unaffected.
React 19 resolution. Each variant resolves to the latest stable patch of its configured minor (e.g. the latest
13.1.x) from the versions API. If no matching stable release exists yet, that variant is silently omitted (the action does not fail).Output example
Before:
[ { "name": "grafana-enterprise", "version": "13.1.5" }, { "name": "grafana-enterprise", "version": "dev-preview-react19" } ]After:
[ { "name": "grafana-enterprise", "version": "13.1.5", "enabledToggles": "" }, { "name": "grafana-enterprise", "version": "13.1.5", "enabledToggles": "react19" } ]The same Grafana release is tested twice — once as a baseline and once with the React 19 toggle enabled. No deduplication is applied; this is intentional.
Workflow update
Consumers should pass the new field to the container: