👷 handle undefined api key for source-maps upload to new DC#3971
👷 handle undefined api key for source-maps upload to new DC#3971thomas-lebeau merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
browser-sdk/scripts/deploy/check-monitors.ts
Lines 41 to 44 in 3f3aac3
After getTelemetryOrgApiKey and getTelemetryOrgApplicationKey were changed to return string | undefined, this call site still forwards their result directly into the headers literal. Under tsconfig.scripts.json (strict mode), { 'DD-API-KEY': string | undefined } is no longer assignable to HeadersInit, so the script fails to type‑check and cannot run. Even at runtime, an undefined secret would now be sent as the literal string 'undefined' instead of failing fast. The headers should guard against missing secrets or cast to a definite string before use.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
codex is kind of right, however, these monitor check only happens when I plan to refactor the way we monitor when release to a DC so we can get rid of the hardcoded list of datacenter in the repo. This will be done in a followup PR, for now this is fine. |
Motivation
When deploying to a new DC, the API key for uploading sourcemaps is not set up yet, in that case we should skip uploading source maps.
Changes
Test instructions
Checklist