-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: Fix issue with custom rules being lost after restarting OpenResty. #8929
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
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. |
| const index = ref('6'); | ||
| const open = ref(false); | ||
| const runtime = ref({ | ||
| name: '', |
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 is an inconsistency in the ref values used between the two instances of <el-tabs> sections:
Before Change:
<el-tab-pane :label="$t('website.updateConfig')" name="0">After Change:
<el-tab-pane :label="'FPM ' + $t('website.source')" name="3">The name attributes "0" and "3" do not match the label text "$t('php.containerConfig')". This will cause the tabs to be labeled differently from their content.
Additionally, you might consider setting default values based on certain conditions (e.g., if user preferences or data dictate a specific tab should open by default).
Optimizations could involve reducing repetition within components like <PHP>, especially since they appear twice with different types. Also, ensure that Vue's reactive references (ref) are correctly set up across all related components to maintain state consistency.
| } | ||
| out, err := compose.Restart(dockerComposePath) | ||
| if err != nil { | ||
| return handleErr(install, err, out) |
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 is an issue with this code related to the restart operation when install.App.Key equals "openresty". The function attempts to get all websites using websiteRepo.GetBy(), which assumes there's a method like that defined on the repository interface.
Here's what needs fixing:
Replace it with the actual implementation from your website repository. Assuming you need data from a specific table or query condition, modify it accordingly:
if install.App.Key == "openresty" {
// Replace this line with the correct API call from your database
websites, err := websiteRepo.GetOpenRestyRelatedWebsites()
if err != nil || len(websites) == 0 {
// Handle error appropriately (e.g., log or update installation status)
return syncAppInstallStatus(&install, true) // Indicate failure to perform the desired task
}
_ = createAllWebsitesWAFConfig(websites)
}
out, err := compose.Restart(dockerComposePath)This ensures better correctness depending on how your website retrieval logic works and prevents runtime errors caused by missing or incorrect function calls.
|
wanghe-fit2cloud
left a comment
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
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



Refs #8923