-
Notifications
You must be signed in to change notification settings - Fork 166
👷 do not rely on monitors for deployment gate #3973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
108e473 to
a7184af
Compare
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage 🔗 Commit SHA: a5ad496 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
f97fd57 to
d547c0e
Compare
5dde1dc to
0f13224
Compare
0f13224 to
892ca7c
Compare
|
@codex review |
There was a problem hiding this 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".
9731eee to
fd91473
Compare
9e7570b to
247005e
Compare
f018b53 to
931ed9e
Compare
There was a problem hiding this 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".
…center configuration
| const data = (await response.json()) as QueryResult | ||
|
|
||
| return data.data.buckets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: add a bit of runtime check to ensure the returned JSON is the expected one, and avoid failing silently if it doesn't match the typescript type.
if (!data || !data.data || !Array.isArray(data.data.buckets) || !data.data.buckets.every(...)) {
throw new Error("Unexpected response from the API: ${JSON.stringify(data)}")
}| runMain(async () => { | ||
| if (checkMonitors) { | ||
| command`node ./scripts/deploy/check-monitors.ts ${uploadPath}`.withLogs().run() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: checking monitors before deploy is pointless since check-monitors only care about the new version being deployed. Maybe we could remove this, or make the query broader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: check-monitors does not check monitors anymore. Maybe rename the script, or since it's only used in deploy-prod-dc, you could just change it to a lib function, not a script.
scripts/deploy/check-monitors.ts
Outdated
| { | ||
| name: 'Telemetry errors on specific org', | ||
| query: BASE_QUERY, | ||
| facet: '@org_id', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: using something like groupBy in the config instead of facet could clarify the purpose.
| @@ -0,0 +1,171 @@ | |||
| /** | |||
| * Check monitors status | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: There are various "check monitors" / "check telemetry monitors" / "gateMonitors" references left, a search and replace could leave things a cleaner state
Motivation
We want to avoid hardcoding the list of datacenter in the release process. To prepare for this, the first step is to get rid of
monitorIdsByDatacenter. For this we're querying the logs API directly. Newly created DC might not have api or application key setup so we're skipping the monitors for thoses.Another benefit from this new strategy for monitoring DC deployments is that we're able to only account for the errors related to the version of the SDK currently being deployed. This makes the release more resilient to unrelated monitor alerts.
Changes
monitorIdsByDatacenterin favor of a logs API queryTest instructions
Checklist