Skip to content

Fix incorrect incompatibility warning in tsh#49455

Merged
gzdunek merged 3 commits intomasterfrom
gzdunek/fix-incorrect-incompatibility-warning
Nov 26, 2024
Merged

Fix incorrect incompatibility warning in tsh#49455
gzdunek merged 3 commits intomasterfrom
gzdunek/fix-incorrect-incompatibility-warning

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Nov 26, 2024

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 of Ping() for easier testing. The problem was the server version is compared against teleport.Version constant 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

@gzdunek gzdunek requested review from rosstimothy and zmb3 and removed request for gabrielcorado and ryanclark November 26, 2024 12:21
@gzdunek gzdunek force-pushed the gzdunek/fix-incorrect-incompatibility-warning branch from 43c97bc to 7ea5696 Compare November 26, 2024 12:28
@gzdunek gzdunek force-pushed the gzdunek/fix-incorrect-incompatibility-warning branch from 7ea5696 to 0382085 Compare November 26, 2024 12:33
@gzdunek gzdunek added this pull request to the merge queue Nov 26, 2024
Merged via the queue into master with commit ad2bb7f Nov 26, 2024
@gzdunek gzdunek deleted the gzdunek/fix-incorrect-incompatibility-warning branch November 26, 2024 17:01
@public-teleport-github-review-bot
Copy link
Copy Markdown

@gzdunek See the table below for backport results.

Branch Result
branch/v17 Create PR

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bogus version warning is emitted even though version are compatible

3 participants