fix: avoid license required before login#12626
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: facdfa8409
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| is_offline: false | ||
| is_fxplay: false | ||
| is_xpackee: false | ||
| is_xpackee: true |
There was a problem hiding this comment.
Restore embedded default to non-EE mode
Changing base.is_xpackee to true in the embedded server config makes fresh/non-overridden installs boot as Enterprise Edition by default, which flips licensing and initialization paths globally (this config is embedded via core/cmd/server/conf/conf.go and read during startup in core/init/viper/viper.go). That is a behavioral change far beyond this fix and can force license-gated flows for users who are not actually deploying EE.
Useful? React with 👍 / 👎.
| if (!globalStore.isXpackEELicenseLoaded) { | ||
| await loadProductProFromDB(); |
There was a problem hiding this comment.
Catch license-load failures in route guard
This guard now awaits loadProductProFromDB() without error handling. That helper uses axios-backed API calls and can reject on network/API errors, so a transient failure will throw from beforeEach, abort navigation, and skip the normal next() path. The previous implementation used fetch(...).catch(() => false) and kept routing functional even when the license check failed.
Useful? React with 👍 / 👎.
No description provided.