Soften API version mismatch from error to warning in tw info#629
Merged
Conversation
Reframe the Tower/Platform API version check as a compatibility warning instead of a hard failure: yellow WARNING in the health table, a clearer message describing impact and remediation, and no non-zero exit code when only the version check is off. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Rob Syme <rob.syme@gmail.com>
The version-mismatch path is a warning, not a failure, so `tw info` exits 0 instead of 1 in that scenario. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Rob Syme <rob.syme@gmail.com>
Visual presentation stays as a warning (yellow WARNING, rewritten message) but the command still exits non-zero so scripts using `tw info` as a strict health check continue to detect the mismatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Rob Syme <rob.syme@gmail.com>
ae2c3e9 to
9d81dfd
Compare
jordeu
approved these changes
May 21, 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.
Summary
Originating from FD-7550: the
tw infoAPI-version check currently renders as a redFAILEDwith the message "Tower API version is X while the minimum required version to be fully compatible is Y", and exits non-zero. Customers read this as a blocking incompatibility, even though the CLI still works for most operations against the older Platform.This PR reframes the check as a compatibility warning:
WARNINGinstead of redFAILEDfor the version row.twmatching the Platform version).getExitCode()no longer fails on a version mismatch — only connection or auth failures produce a non-zero exit. Scripts runningtw infoas a health check no longer break for a non-fatal condition.Example output:
Test plan
./gradlew testpasses (existingInfoCmdTestdoes not assert on the warning text)tw infoagainst a Platform older than the CLI'sversionApiand confirm yellow WARNING + new messagetw infoagainst a compatible Platform and confirm green OKtw infoexit code is 0 when only the version check warns, non-zero on connection/auth failure🤖 Generated with Claude Code