Warn when test results are present but Test Reports API token is missing - #269
Open
lpusok wants to merge 2 commits into
Open
Warn when test results are present but Test Reports API token is missing#269lpusok wants to merge 2 commits into
lpusok wants to merge 2 commits into
Conversation
The Deploy step only uploaded test results to the Tests tab when the addon_api_token was set, and skipped the upload silently otherwise. On pull-request-triggered builds the token is not available by default, so users saw no test results and no explanation. Always run deployTestResults and, when test results are present but the token is empty, emit a warning explaining why the upload was skipped and how to work around it (trigger via push), instead of skipping silently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (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.
Context
Ref: SSW-3084
A customer's test results weren't showing up in the Tests tab on their
merge_request_buildworkflow. Root cause: the Deploy step only uploads test results when it has aaddon_api_token(Test Reports API token, sourced from$ADDON_VDTESTING_API_TOKEN). On pull-request-triggered builds this token is not available by default (Bitrise does not expose app-level secrets to PR builds unless explicitly opted in), so the step silently skipped the upload — the only trace in the log was the routineaddon_api_token: unset.Change
deployTestResultsnow always runs (theif config.AddonAPIToken != ""guard around the call site is removed).The step's
step.ymlalready hasrun_if: .IsCI, so it only runs in CI — no extra CI check is needed.Warning shown
Tests
Added
Test_deployTestResultscovering: (a) results present + empty token → warning fires, upload not attempted; (b) no results + empty token → stays silent about the token.go build,go vet, andgo test ./all pass.🤖 Generated with Claude Code