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

Add version incompatibility warning to Connect #51832

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ravicious
Copy link
Member

Closes #32555.

TODO:

  • Show a warning in FormLogin.
    • We can reuse the copy from tsh.

      teleport/lib/client/api.go

      Lines 4409 to 4436 in 9ca0592

      case ClientVersionTooOld:
      return fmt.Sprintf(`
      WARNING
      Detected potentially incompatible client and server versions.
      Minimum client version supported by the server is %v but you are using %v.
      Please upgrade tsh to %v or newer or use the --skip-version-check flag to bypass this check.
      Future versions of tsh will fail when incompatible versions are detected.
      `,
      versions.MinClient, versions.Client, versions.MinClient), nil
      case ClientVersionTooNew:
      serverMajorVersion, err := utils.MajorSemver(versions.Server)
      if err != nil {
      return "", trace.Wrap(err)
      }
      serverVersionWithWildcards, err := utils.MajorSemverWithWildcards(serverMajorVersion)
      if err != nil {
      return "", trace.Wrap(err)
      }
      return fmt.Sprintf(`
      WARNING
      Detected potentially incompatible client and server versions.
      Maximum client version supported by the server is %v but you are using %v.
      Please downgrade tsh to %v or use the --skip-version-check flag to bypass this check.
      Future versions of tsh will fail when incompatible versions are detected.
      `,
      serverVersionWithWildcards, versions.Client, serverVersionWithWildcards), nil
  • Add story (stories?).
  • Add a config option for skipping version check.
    • I imagine it'd be cool to be able to change the config option straight from the warning itself. If it's too much work, just skip it.
    • In tsh, the flag completely skips the version check. Connect will still perform it, but it should simply not display the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add version incompatibility warnings to Connect
1 participant