Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect incompatibility warning in tsh #49455

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

gzdunek
Copy link
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 zmb3 and rosstimothy 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
40 checks passed
@gzdunek gzdunek deleted the gzdunek/fix-incorrect-incompatibility-warning branch November 26, 2024 17:01
@public-teleport-github-review-bot

@gzdunek See the table below for backport results.

Branch Result
branch/v17 Create PR

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