Fix incorrect incompatibility warning in tsh#49455
Merged
Conversation
43c97bc to
7ea5696
Compare
7ea5696 to
0382085
Compare
zmb3
approved these changes
Nov 26, 2024
rosstimothy
approved these changes
Nov 26, 2024
carloscastrojumo
pushed a commit
to carloscastrojumo/teleport
that referenced
this pull request
Feb 19, 2025
* Extract `getClientIncompatibilityWarning` for easier testing * Remove the check against v15 cluster * Do not show a warning about too new client version when server and client are on the same major version
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.
Closes #49441
When adding a warning about connecting to a too old cluster from tsh, I mistakenly compared the entire version strings instead of major versions only. This caused the warning to be shown even when the client is on a newer patch version which is compatible.
I decided to extract
getClientIncompatibilityWarning()out ofPing()for easier testing. The problem was the server version is compared againstteleport.Versionconstant which I can't overwrite in tests.Additionally, I removed a check requiring at least a v15 cluster. tsh v17 is not compatible with clusters < 17.0.0.
Changelog: Fixed an incorrect warning indicating that tsh v17.0.2 was incompatible with cluster v17.0.1, despite full compatibility