rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
462 stars 261 forks source link

Change way supported version is detected #6665

Closed nwmac closed 2 years ago

nwmac commented 2 years ago

Currently we use the subscription ID setting.

Change this to use the metadata from the new /rancherversion endpoint - see: https://github.com/rancher/rancher/pull/38445/files

We should add a request to this API when the UI loads - before login and store that data. This will not change.

We can do this now and if we get a 404, we should populate empty data and store that the UI is not a supported deployment.

slickwarren commented 2 years ago

I’m not sure what all should be tested besides testing that /rancherversion has a response. Could I get the QA template filled out for this one? I currently get the following response: {"Version" : "", "GitCommit" : "", "RancherPrime" : "false"} is that all that is expected? Also, when using 2.7-head, the Version value is the same as GitCommit.

here is my current test plan:

nwmac commented 2 years ago

@slickwarren This was to make sure we wired up non-community detection to the new version endpoint.

To validate:

Shavindra commented 2 years ago

Further instructions: https://github.com/rancher/dashboard/pull/6736#issue-1349291691

@slickwarren

Could also be resolved by: PR https://github.com/rancher/dashboard/pull/7131

Issues: https://github.com/rancher/dashboard/issues/6663 https://github.com/rancher/dashboard/issues/6665

slickwarren commented 2 years ago

tested on v2.7.-rc6:

slickwarren commented 2 years ago

Similar / related issue that may have been part of these changes: There is no longer an option on the support page to enter a subscription ID. Perhaps related to the way version is detected? Or in other words, perhaps another reason that commercial support option still appears (because subscription ID is not set) Screen Shot 2022-10-28 at 11 10 03 AM

nwmac commented 2 years ago

@slickwarren

"on a non-community version of rancher (docker installed), the response does not indicate it is non-community version. I believe that due to this, the commercial support option still shows up in the UI, though all of the branding is correctly showing the non-community brand."

That sounds like a backend issue - we rely on the /rancherversion endpoint telling us if it a the community version or not.

Regarding the subscription ID change, that is intentional - this is no longer needed to determine if it is a supported install - that is done from the /rancherversion endpoint metadata

jiaqiluo commented 2 years ago

can be validated in non-community version v2.7.0-rc8

slickwarren commented 2 years ago

tested on v2.7.0-rc8: