cloudflow icon indicating copy to clipboard operation
cloudflow copied to clipboard

kubectl-cloudflow should produce more informative message when it's incompatible with Cloudflow operator

Open yuchaoran2011 opened this issue 5 years ago • 6 comments

Is your feature request related to a problem? Please describe. Reported by @longmuir. When the versions of kubectl-cloudflow and Cloudflow operator are not compatible, running kubectl-cloudflow will produce an error:

$ kubectl cloudflow deploy /Users/jamielongmuir/code/lightbend/cloudflow/examples/call-record-aggregator/target/call-record-aggregator.json

[Error] This version of kubectl Cloudflow is not compatible with the Cloudflow operator, please upgrade the Cloudflow operator

That's not very helpful. First, it doesn't say what the versions of kubectl-cloudflow and Cloudflow operator are. Second, it says Cloudflow operator should be upgraded, even though there are cases when the version of kubectl-cloudflow lags behind that of the Cloudflow operator, in which case the former should be upgraded instead.

Is your feature request related to a specific runtime of cloudflow or applicable for all runtimes? N/A

Describe the solution you'd like A more informative message

Describe alternatives you've considered N/A

Additional context #525

yuchaoran2011 avatar Jun 23 '20 21:06 yuchaoran2011

@yuchaoran2011 We do a version check based on a protocol version, which is established between the operator and the cli. Not sure why it is not helpful, in this case you really need to upgrade the cloudflow (operator) installation.

Second, it says Cloudflow operator should be upgraded, even though there are cases when the version of kubectl-cloudflow lags behind that of the Cloudflow operator, in which case the former should be upgraded instead.

That is incorrect. If kubectl cloudflow is incompatible with the protocol version and it is only supporting a lower version it will actually say "This version of kubectl Cloudflow is not compatible with the Cloudflow operator, please upgrade kubectl cloudflow".

RayRoestenburg avatar Jun 24 '20 07:06 RayRoestenburg

@RayRoestenburg Hmm interesting. This issue was discovered by @longmuir. If my understanding is correct, his case was that he had 2.0.0 version of Cloudflow operator but his kubectl-cloudflow was outdated. The message he got told him to upgrade operator, even though it was kubectl-cloudflow that should be upgraded.

Screen Shot 2020-06-24 at 15 15 28

yuchaoran2011 avatar Jun 24 '20 19:06 yuchaoran2011

Yes, this was with a fresh install on the marketplace with an older version of the kubectl plugin.

The message would be more helpful if it also included the versions in the error message.

longmuir avatar Jun 30 '20 18:06 longmuir

This is possible, the operator will have to advertise it's version in the protocol-version configmap.

On Tue, Jun 30, 2020 at 8:06 PM Jamie Longmuir [email protected] wrote:

Yes, this was with a fresh install on the marketplace with an older version of the kubectl plugin.

The message would be more helpful if it also included the versions in the error message.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lightbend/cloudflow/issues/531#issuecomment-651955391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGGCNJ5MYUV5FUSLF63O3RZISS3ANCNFSM4OGCCMRA .

-- Cloudflow Tech Lead, Lightbend, Inc. [email protected] [email protected] @RayRoestenburg https://twitter.com/RayRoestenburg

https://www.lightbend.com/

RayRoestenburg avatar Jul 01 '20 19:07 RayRoestenburg

In master I've made a quick fix:

First, it doesn't say what the versions of kubectl-cloudflow and Cloudflow operator are.

This is not done yet, it just tells you to upgrade kubectl cloudflow or the operator. We can't really say to which version to upgrade, since that is unknown. The version of the operator is not in the protocol version config map yet, but this could be added.

Second, it says Cloudflow operator should be upgraded, even though there are cases when the version of kubectl-cloudflow lags behind that of the Cloudflow operator, in which case the former should be upgraded instead. This is now fixed.

@longmuir @yuchaoran2011

RayRoestenburg avatar Jul 17 '20 10:07 RayRoestenburg

What would remain for this issue to be closed is to mention which version of kubectl cloudflow and cloudflow operator are used.

RayRoestenburg avatar Jul 17 '20 10:07 RayRoestenburg