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

[CLI Improvements] validate that server and CLI version match #2298

Closed
Tracked by #2182
schoren opened this issue Apr 3, 2023 · 6 comments · Fixed by #2598
Closed
Tracked by #2182

[CLI Improvements] validate that server and CLI version match #2298

schoren opened this issue Apr 3, 2023 · 6 comments · Fixed by #2598
Assignees

Comments

@schoren
Copy link
Collaborator

schoren commented Apr 3, 2023

When running any cli command that communicates with a server, we want to make sure that they are both speaking the same version, to avoid unexpected behaviors.

@schoren schoren mentioned this issue Apr 3, 2023
19 tasks
@xoscar xoscar changed the title validate that server and CLI version match [CLI Improvements] validate that server and CLI version match Apr 10, 2023
@xoscar
Copy link
Collaborator

xoscar commented Apr 10, 2023

@schoren when a version mismatch happens, what do we need to do? what is the goal for users to do after they find out there is a version mismatch?

@schoren
Copy link
Collaborator Author

schoren commented Apr 10, 2023

Probably a question for @kdhamric and @olha23. We talked about not allowing to run commands if version don’t match, but we didn’t go into more details

@olha23
Copy link

olha23 commented Apr 11, 2023

@schoren @xoscar When a version mismatch happens between the CLI and the server, the goal is to prompt the user to update the CLI to match the server version. User should be informed of the version mismatch and be provided with instructions on how to update the CLI to match the server version. This can be done through a clear error message, along with instructions or a link to documentation on how to update the CLI.

@xoscar
Copy link
Collaborator

xoscar commented May 7, 2023

Team, by going through this issue I found a couple of things we might need to consider:

  1. What happens if the server is behind the CLI? Should we prompt an error message?
  2. If we want to enforce that the server and CLI versions match, we'll have to trigger a request to get the server version before executing any command/verb. Is this what we want?

@schoren
Copy link
Collaborator Author

schoren commented May 8, 2023

  1. I think we defined a first iteration where ANY kind of version missmatch triggers a message on the CLI side prompting users to upgrade.
  2. If I remember correctly we already talked about having the server either exposing a /version (or similar) endpoint. I think we can also consider addding an X-Tracetest-Version header in all responses, so that there's no need for a special request to validate the response. On any request made by the CLI, it can compare the versions.

@kdhamric
Copy link
Collaborator

kdhamric commented May 8, 2023

@schoren response sound good to me

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

Successfully merging a pull request may close this issue.

4 participants