Skip to content

Conversation

@thomas-lebeau
Copy link
Collaborator

Motivation

As part of PR0, we're introduction a new DC pr00test.staging.dog.
This PR simplify a bit the runbook and setup the new DC.

It is recommended to review commit by commit.

Changes

  • Collocate monitorIdsByDatacenter with other site config
  • Remove the hardcoded list of minor datacenter. This way new datacenters are automatically deployed as with the other minor DCs.
  • Add a new manual deploy job that can be configured in the gitlab UI when ran. This allow to deploy the latest release of the SDK to a new DC without having to create a new release.
  • Add the new DC config

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@thomas-lebeau thomas-lebeau marked this pull request as ready for review November 18, 2025 13:28
@thomas-lebeau thomas-lebeau requested a review from a team as a code owner November 18, 2025 13:28
@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Nov 18, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 164.05 KiB 164.05 KiB 0 B 0.00%
Rum Profiler 4.84 KiB 4.84 KiB 0 B 0.00%
Rum Recorder 19.50 KiB 19.50 KiB 0 B 0.00%
Logs 55.91 KiB 55.91 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 121.33 KiB 121.33 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance

Pending...

🔗 RealWorld

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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".

Comment on lines 18 to 20
- yarn
- yarn build:bundle
- node ./scripts/deploy/deploy-prod-dc.ts v${VERSION%%.*} $UPLOAD_PATH true
- node ./scripts/deploy/deploy-prod-dc.ts v${VERSION%%.*} $UPLOAD_PATH --withMonitorChecks true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Pass boolean flag without value to avoid parseArgs crash

The deploy job now invokes deploy-prod-dc.ts with --withMonitorChecks true, but the script switched to parseArgs({ type: 'boolean' }). For boolean options, parseArgs does not accept a space‑separated value, so this call is parsed as a positional "true" and Node throws ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL before any deployment commands run. As written the automatic deploy pipeline will fail immediately. The command needs to use --withMonitorChecks/--no-withMonitorChecks or --withMonitorChecks=true instead (same problem exists in the manual pipeline).

Useful? React with 👍 / 👎.

Comment on lines 18 to 26
} = parseArgs({
allowPositionals: true,
options: {
withMonitorChecks: {
type: 'boolean',
default: true,
},
},
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The AI is kind of right here, what you are trying to do won't work.

The simplest solution is to remove the default: true here, and call deploy-prod-dc script with --withMonitorChecks only when you want to check monitors (in the auto pipeline):

node ./scripts/deploy/deploy-prod-dc.ts v${VERSION%%.*} $UPLOAD_PATH --withMonitorCheck

If you want to keep the default: true, you could enable allowNegative in parseArgs and invoke the script with --no-withMonitorCheck in the manual pipeline:

node ./scripts/deploy/deploy-prod-dc.ts v${VERSION%%.*} $UPLOAD_PATH --no-withMonitorCheck

Also, nitpicking a bit, but it could be nicer to format the option name as --monitor-check or something.

* - Telemetry errors on specific org
* - Telemetry errors on specific message
*/
export const monitorIdsByDatacenter: Record<string, [number, number, number]> = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: nitpicking and for the record: I think it would be nice to have a datacenterConfiguration object like:

export const datacenterConfigurations = {
  us1: { site: 'xxx', monitorIds: [...] },
  ...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think we actually need to discover these monitors in the middle/long term

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: this file contains more than sites now

… 'withMonitorChecks' for improved clarity and consistency in monitor checks during production deployment.
@thomas-lebeau thomas-lebeau changed the title Thomas.lebeau/pr00test 1 ♻️ refactor new datacenter workflow Nov 18, 2025
@thomas-lebeau thomas-lebeau merged commit 656ba73 into main Nov 18, 2025
21 checks passed
@thomas-lebeau thomas-lebeau deleted the thomas.lebeau/pr00test-1 branch November 18, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants