-
Notifications
You must be signed in to change notification settings - Fork 506
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: better error when watch api versions are not compatible #4149
Conversation
8e04898
to
e77d344
Compare
@@ -46,6 +46,7 @@ use tracing::instrument; | |||
|
|||
/// The minimum VERSION of the Fluvio Platform that this client is compatible with. | |||
const MINIMUM_PLATFORM_VERSION: &str = "0.9.0"; | |||
pub(crate) const VERSION: &str = include_str!("../../../VERSION"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we have this somewhere already? Seems like we should name this PLATFORM_VERSION at least.
Is MINIMUM_PLATFORM_VERSION doing anything useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, rename only in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About MINIMUM_PLATFORM_VERSION
it's been checked after the lookup_version of the watch API. And will return it:
#[error("Cluster (with platform version {cluster_version}) is older than the minimum required version {client_minimum_version}
To interact with this cluster, please install the matching CLI version using the following command:
curl -fsS https://hub.infinyon.cloud/install/install.sh | VERSION={cluster_version} bash
")]
But as we're not updating this const does not seem so useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, let's just leave it all alone until we get a improved wider compatability check.
Lets leave the constant as VERSION. Forget renaming it PLATFORM_VERSION as it would be out of place with all the other crates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related: #3441