-
Notifications
You must be signed in to change notification settings - Fork 25k
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
SQL CLI requires strict version matching #36186
Comments
Pinging @elastic/es-search |
@kcm I don't think this is a bug, as this was the initial intention with this functionality. |
Agreed that I don't think it's a bug, but it's not particularly user friendly to require strict version matching. I think it's reasonable that a typical user will do things like rolling restart upgrades while leaving older cli utilities around (and expecting them to work). |
I agree with @eskibars that, at least for CLI, we should be more lenient and not force an upgrade every time the server upgrades as well however how and when we'll get around to do this, remains to be investigating. Long story - off the top of my head: A long with the CLI this leads to a versioning strategy similar to that of the server whoever separate from it since it affects only the SQL clients. So the same current/minimum/maximumCompatibilityVersion strategy might work however this needs more thinking before getting around implementing which is a risk for GA. |
With other clients we support forwards compatibility - an older client can talk to a server that is one major version newer. We should probably stick with that everywhere. The advantage of this is that it "fits in" perfectly with how we do versioning on the HTTP API, so long as clients are willing to ignore fields that they don't know. I suspect we implemented strict version checking in the CLI because we figured we'd break the HTTP API because SQL was so new. If we're sure we're not going to then we can remove that check. Until we're sure, we might want to keep it. Maybe add some note about "because SQL is still beta" or something. |
@nik9000 that's the gist of my intention, related to how we treat compatibility everywhere. I get the strict checking due to the SQL feature gray area, but then I kind of think it's a bug to wing it in that case. :) |
@kcm A bug implies incorrect behavior which is not the case; the intent is for all SQL consumers/drivers/clients to have the same version as the server. For example, adding INTERVALs meant adding a new SQL data type that the consumers had to understand. Allowing an old CLI to work with it would kinda work but it would display the data incorrectly (serialized format vs consumable format). Same will happen for geo types when they'll be introduced. |
I downloaded a snapshot version, and the CLI is not woking, because Elasticsearch version does not match what it expects. Server version is
|
@j-bennet Did u disable the authentication in ES? Since the URI seems otherwise to miss credentials. |
@bpintea I did not provide an URI at all, this is the default.
I should have gotten a message about incorrect auth credentials. |
That's true, we could probably do better here. |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
elasticsearch/x-pack/plugin/sql/sql-cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java
Line 151 in 20e1b5e
Perhaps this could check and indicate against minimumCompatibilityVersion() instead? It might misindicate if the SQL feature isn't properly represented in the logic, but it would be a step better than checking strict version equality.
cc @kurtado
The text was updated successfully, but these errors were encountered: