OB-10135: propagate automate build id on observability buildStop#1145
Open
darshan3881 wants to merge 3 commits into
Open
OB-10135: propagate automate build id on observability buildStop#1145darshan3881 wants to merge 3 commits into
darshan3881 wants to merge 3 commits into
Conversation
Cache the automate build hashed_id at build-create time and include it as `automate_build_id` on the observability-api buildStop payload (`PUT /api/v1/builds/:id/stop`). Lets obs-api persist the mapping so the synergy dashboard can call the railsApp resource-errors endpoint in the automate id-space directly (removing the OB-9830 reverse-lookup shim once end-to-end coverage is verified). Only fires when `isTestObservabilitySession` is true, so non-o11y runs are unaffected. Payload change is additive; obs-api ingest accepts the new field via a typed `automate_build_id` on `BuildStopParams`. Spec: https://browserstack.atlassian.net/wiki/spaces/ENG/pages/6322258049/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Stamp the automate build id onto the observability
buildStoppayload so the pipeline can persist it and the synergy dashboard can address the automate resource-errors endpoint directly (OB-10135). Producer-side change only — two lines, no new endpoint.What lands here
bin/commands/runs.jsprocess.env.BROWSERSTACK_AUTOMATION_BUILD_ID = data.build_id;bin/testObservability/helper/helper.jsautomate_build_id: process.env.BROWSERSTACK_AUTOMATION_BUILD_IDin thePUT /api/v1/builds/:id/stoppayloadThe env var mirrors the existing
BS_TESTOPS_BUILD_HASHED_IDpattern. The automate build is created after the observability buildStart (post zip-upload), sobuildStopis the first lifecycle event where the id exists — hence it's stamped there, not at start.Why
OB-9830 traced the Cypress resource-errors 404 to an id-space mismatch on the synergy dashboard. The clean end-state: the SDK sends the automate build id → pipeline persists it in the build metadata → obs-api serves it → FE calls the automate resource-errors endpoint with the correct id. This PR is the producer half.
Related PRs
Test plan
automate_build_id, and the value surfaces on the observability build'smetaDataand rides theBUILD_FINISHEDpusher event (confirmed on the synergy dashboard).Notes