fix(ci-info): use GITHUB_RUN_ID for build_number on GitHub Actions [SDK-6279]#1123
Open
harshit-browserstack wants to merge 1 commit into
Open
fix(ci-info): use GITHUB_RUN_ID for build_number on GitHub Actions [SDK-6279]#1123harshit-browserstack wants to merge 1 commit into
harshit-browserstack wants to merge 1 commit into
Conversation
…DK-6279] The GitHub Actions branch of getCiInfo() set build_number from GITHUB_RUN_NUMBER (the per-workflow sequential counter) while build_url is built from GITHUB_RUN_ID (the globally-unique run id in the actions/runs/<id> URL). The two referenced different identifiers for the same run, so Observability's dashboard "Rerun" could not re-dispatch the workflow (GitHub returned 404 -> obs-api "Invalid Params!" -> HTTP 500). Align build_number with the run id already used by build_url. GitHub Actions only; all other CI providers are unchanged. Co-Authored-By: Claude Opus 4.8 <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.
Problem
On GitHub Actions,
getCiInfo()(bin/helpers/helper.js) populatedbuild_numberfromGITHUB_RUN_NUMBER— the per-workflow sequential counter (e.g.23) — whilebuild_urlis built fromGITHUB_RUN_ID— the globally-unique run id (26976467840) that appears in theactions/runs/<id>URL.So the
ci_infothe SDK ships to TestHub hadbuild_urlandbuild_numberpointing at two different identifiers for the same run. Test Observability's dashboard Rerun keys its GitHubworkflow_dispatchre-dispatch offbuild_number;23is not a valid run id, so GitHub returns 404, which obs-api translates to400 "Invalid Params!", surfacing to the customer as an HTTP 500. (SDK-6279)Fix
Aligns
build_numberwith the run idbuild_urlalready uses on the line above.Scope
GitHub Actions branch only. Every other CI provider (Jenkins, CircleCI, Travis, Bitbucket, Drone, Semaphore, GitLab, Buildkite, VSTS) has its own independent
build_numberline and is untouched — GitHub was the lone provider whosebuild_numbersource diverged from its ownbuild_urlsource. Introduced in354ddffd(INTG-2082).Verification
getCiInfo()run under env-faithful GitHub Actions variables:build_numberbuild_urlruns/<id>?"23""26976467840"🤖 Generated with Claude Code