Skip to content

Commit 1e08d42

Browse files
xxshubhamxxclaude
andcommitted
fix(observability): flip correct haveSentBuildUpdate flag so BuildUpdate sends once, not per test/hook [SDK-6574]
The one-shot guard `if(!this.haveSentBuildUpdate && ...)` set a dead sibling field `this.shouldSendBuildUpdate = true` (written here only, read nowhere in the repo) instead of `this.haveSentBuildUpdate`. The flag never flipped, so the BuildUpdate event (a byte-identical, build-level `observability_version` payload) re-fired on every test/hook event — hundreds to thousands of identical events per build. Setting the real flag (synchronously, before the await — so interleaved async mocha handlers cannot double-send) restores the intended once-per-reporter-instance behaviour. Bug present since the guard was introduced (a0f7404, 2023-06-18); not a regression. Complements consumer-side dedupe TRAP-4033. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0ff7157 commit 1e08d42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bin/testObservability/reporter/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ class MyReporter {
565565
}
566566

567567
if(!this.haveSentBuildUpdate && (process.env.observability_framework_version || this.currentCypressVersion)) {
568-
this.shouldSendBuildUpdate = true;
568+
this.haveSentBuildUpdate = true;
569569
const buildUpdateData = {
570570
event_type: 'BuildUpdate',
571571
'misc': {

0 commit comments

Comments
 (0)