Allow smoke testing pre-release analytics CLI via Actions variable#1147
Merged
Merged
Conversation
Add an org-wide escape hatch for exercising a specific (e.g. pre-release)
analytics CLI build in CI test uploads without a code change, via the
ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION Actions variable.
The uploader runs inside the linter_tests, tool_tests and action_tests
composite actions, and composite actions cannot read the vars context, so
the version is threaded through a new input (defaulting to "latest") and
supplied as ${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }} at every
call site. The uploader step passes it through as cli-version; the uploader
action resolves "latest" itself.
The input is named analytics-cli-version (not cli-version) because these
actions already have a cli-version input meaning the trunk CLI under test,
which is unrelated to the analytics uploader's CLI version.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qcw8v8TiTHRGdDSH7J3ia
acatxnamedvirtue
approved these changes
Jul 8, 2026
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.
What
Adds an org-wide escape hatch for exercising a specific (e.g. pre-release) analytics CLI build in the test-result uploads, without a code change. Set the
ANALYTICS_CLI_PRE_RELEASE_TEST_VERSIONActions variable to a version and everyanalytics-uploaderinvocation uses it; set it tolatest(the default) and the uploader resolves latest itself.Mirrors the change in
trunk-io/trunk2,trunk-io/trunk, andtrunk-io/chimerarepo.analytics-cli-version(notcli-version)These composite actions already have a
cli-versioninput, but it means the trunk CLI under test (PLUGINS_TEST_CLI_VERSION) — unrelated to the analytics uploader. To avoid a collision, the new input is namedanalytics-cli-version.Why it's threaded through inputs, not
varsdirectlyThe uploader lives inside the
linter_tests,tool_tests, andaction_testscomposite actions, and thevarscontext is not readable inside composite actions. So ananalytics-cli-versioninput (defaultlatest) is added to each, and${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }}is passed at every call site. The uploader step forwards it:cli-version: ${{ inputs.analytics-cli-version }}.Behavior
ANALYTICS_CLI_PRE_RELEASE_TEST_VERSIONcli-versionusedlatest(default)0.14.0.pre.beta.2These steps previously set no
cli-version, so thelatestdefault is behavior-preserving.Changes
.github/actions/{linter_tests,tool_tests,action_tests}/action.yaml— newanalytics-cli-versioninput (defaultlatest);Upload prod resultsstep now setscli-version: ${{ inputs.analytics-cli-version }}.analytics-cli-version: ${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }}:pr.yaml(6),nightly.yaml(4),windows_nightly.yaml(2),upload_results.reusable.yaml(1).Notes / scope
windows_nightly.yamland the disabledwindows_*jobs inpr.yaml). The uploader step is gatedrunner.os != 'Windows', so those are harmless no-ops today — but consistent and ready if Windows upload is enabled.upload_results.reusable.yaml'strunk upload-linter-versionsstep is a plugins-specific upload (not the analytics-uploader) and is untouched. The loneGemfile(linters/brakeman/test_data/) is linter test fixture data, not a CI rspec flow.trunk check/trunk fmtlocally (the sandbox proxy blocksget.trunk.io); edits match existing indentation and were validated with a YAML parser; the repo's Trunk Check on the PR is the verification.🤖 Generated with Claude Code
Generated by Claude Code