ci(staging): enable analytics dual-write on the staging web build#7718
Merged
Conversation
Append ANALYTICS_DUAL_WRITE_ENABLED=true + TEACHER_BFF_API (staging BFF) to build/web/.env in the staging web deploy (mirrors the ENABLE_SEMANTICS staging override). Both are required for the client dual-write (client#7464) to fire; NOT set on production (release.yaml) until validated on staging. Requires the BFF CORS allowlist to include app.staging.pangea.chat (admin-dash-api PR #57). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe staging web deployment workflow now injects analytics dual-write and teacher BFF API settings into the deployed web environment configuration. Dart UI expressions and Pangea tests are reformatted without behavior changes. ChangesDeployment and formatting updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
Turn on the best-effort analytics dual-write (client#7464) for the staging web build by setting its two required env flags.
Why
client#7464 added the dual-write but ships it dark — the client only POSTs construct uses to the teacher-BFF when BOTH
ANALYTICS_DUAL_WRITE_ENABLED=trueandTEACHER_BFF_APIare set. Neither is set anywhere today, so the deployed staging app does not dual-write at all. This appends both tobuild/web/.envin the staging web deploy, mirroring the existing staging-onlyENABLE_SEMANTICSoverride.Changes
.github/workflows/main_deploy.yamlANALYTICS_DUAL_WRITE_ENABLED=true+TEACHER_BFF_API=https://admin-dash-api.staging.pangea.chattobuild/web/.env(staging web deploy only)release.yaml(production) is untouched — prod stays dark until validated on staging..envat runtime from/.env, so this takes effect for staging web users on next load, no app rebuild.Ordering / dependency (do NOT merge first)
This depends on admin-dash-api PR #57 (adds the client web origin to
CORS_ORIGINSand allows theAuthorizationheader through CORS). Merge/deploy #57 first; then merge this. If this lands first, web dual-write POSTs harmlessly CORS-fail (the write is best-effort/fire-and-forget, so no user-facing breakage — just no data lands).Scope note
This enables web only (staging has no native pipeline). Native (iOS/Android) dual-write requires the same flags in the native build's bundled
.env+ a new app release — a separate change.Test plan
release.yamluntouched)source='client'rows land → backfill → KG reflects🤖 Generated with Claude Code
Summary by CodeRabbit