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
refactor: add system initialization check and redirect to console if not initialized #3892
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3892 +/- ##
============================================
- Coverage 60.21% 60.20% -0.01%
- Complexity 2331 2340 +9
============================================
Files 351 353 +2
Lines 12045 12083 +38
Branches 877 878 +1
============================================
+ Hits 7253 7275 +22
- Misses 4363 4378 +15
- Partials 429 430 +1
|
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
在本地及 docker 下可以正常跳转
/cherry-pick release-2.5 |
@ruibaby: once the present PR merges, I will cherry-pick it on top of release-2.5 in a new PR and assign it to you. In response to this:
Instructions 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/test-infra repository. |
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.
开发环境和 Docker 镜像均已测试,符合预期。
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LIlGG, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ruibaby: new pull request created: #3895 In response to this:
Instructions 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/test-infra repository. |
What type of PR is this?
/kind improvement
/area core
/milestone 2.5.2
What this PR does / why we need it:
添加系统初始化检查,如果未初始化则重定向到控制台。
此检查只针对首页,当用户访问首页时检查到未初始化则跳转到 Console 让用户初始化以优化没有数据时的访问体验。
SetupStateCache 用于缓存系统初始化状态,当数据库状态改变时会更新缓存以优化性能,避免每次访问首页都查询数据。
Which issue(s) this PR fixes:
A part of #3230
Does this PR introduce a user-facing change?