Forward AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to production builds#2721
Merged
Forward AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to production builds#2721
AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to production builds#2721Conversation
The production and Safari submit workflows were omitting this secret from the webpack build env, so DefinePlugin baked in an empty deployment key. That made `initExperimentClient` short-circuit at runtime, leaving feature flags always evaluating to their defaults in the shipped extension even though analytics events continued to flow. The beta workflow already passes this key; production and Safari now match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures production and Safari release workflows forward AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY into yarn build:extension:production so Amplitude Experiment feature flags are evaluated correctly in shipped builds.
Changes:
- Forward
AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEYin the production release workflow build step. - Forward
AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEYin the Safari release workflow build step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/submitProduction.yml | Adds AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to the production extension build command so webpack can bake the correct value. |
| .github/workflows/submitSafari.yml | Adds AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to the Safari extension build command to match beta/production behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY to production builds
piyalbasu
approved these changes
Apr 24, 2026
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.
Summary
submitProduction.yml) was invokingyarn build:extension:productionwithoutAMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY. With no key forwarded, webpack'sDefinePluginbaked in an empty string, so at runtimeinitExperimentClientshort-circuited and every feature flag evaluated to its default in the shipped extension — even though analytics events continued to flow becauseAMPLITUDE_KEYwas still being passed.submitBeta.yml) already referenced this key; production now matches it. All environments use the sameAMPLITUDE_EXPERIMENT_DEPLOYMENT_KEYvalue.submitSafari.ymlfor consistency. We aren't currently running that workflow, but wiring it up now means flags will work out of the box if we ever revive Safari builds.AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEYGitHub Actions secret was not actually set in the repository until now — it has just been added. Without this secret, even the beta workflow (which already referenced it) would have been interpolating an empty string into its build command, so feature flags were effectively disabled across all shipped builds. Setting the secret + this PR together is what restores flag evaluation end-to-end.Test plan
maintenance_banner) evaluates correctly in the popup.🤖 Generated with Claude Code