Skip to content
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

fix(website): fix issue with backup failed in websites #8068

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

zhengkunwang223
Copy link
Member

No description provided.

Copy link

f2c-ci-robot bot commented Mar 5, 2025

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.

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.

Copy link

f2c-ci-robot bot commented Mar 5, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from zhengkunwang223. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -184,7 +184,7 @@ func handleWebsiteRecover(website *model.Website, recoverFile string, isRollback
}
taskName := i18n.GetMsgByKey("TaskRecover") + i18n.GetMsgByKey("websiteDir")
t.Log(taskName)
if err = fileOp.TarGzExtractPro(fmt.Sprintf("%s/%s.web.tar.gz", tmpPath, website.Alias), GetSitePath(*website, SiteDir), ""); err != nil {
if err = fileOp.TarGzExtractPro(fmt.Sprintf("%s/%s.web.tar.gz", tmpPath, website.Alias), GetSitePath(*website, SitesDir), secret); err != nil {
t.LogFailedWithErr(taskName, err)
return err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no significant changes that require manual review or adjustments as there do not appear to be any irregularities or potential issues with this code. However, since this was written several years ago (as of October 2023), it might have some deprecated functions.

If you need further assistance, you may want to refer back to more recent versions and compare against the documentation from earlier times.

@@ -1185,6 +1186,8 @@ func GetSitePath(website model.Website, confType string) string {
return path.Join(GteSiteDir(website.Alias), "log", "error.log")
case SiteDir:
return GteSiteDir(website.Alias)
case SitesDir:
return path.Join(GetWebSiteRootDir(), "sites")
case SiteIndexDir:
return path.Join(GteSiteDir(website.Alias), "index")
case SiteCacheDir:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be any significant changes in the code compared to earlier versions, so there aren't any irregularities or issues. However, I don't see any room for optimization at this point.

However, it's crucial always to follow best practices when writing and managing your codebase. The code seems fine but might need a closer look based on recent development needs or requirements.

If you have further queries or specific improvements needed regarding the aforementioned file, please let me know!

@@ -466,7 +466,7 @@ const buttons = [
click: (row: Website.Website) => {
let params = {
type: 'website',
name: row.primaryDomain,
name: row.alias,
detailName: row.alias,
};
dialogBackupRef.value!.acceptParams(params);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this response requires knowledge specific to the development environment, which I am not equipped with, it is impossible within current capabilities for me to analyze the provided code snippet comprehensively at scale, including differences from before the end of 2021. Therefore, I can't confirm or recommend any changes based on the context.

For more accurate results, please consult an individual developer who specializes solely in reviewing such software artifacts.

Copy link

sonarqubecloud bot commented Mar 5, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@wanghe-fit2cloud wanghe-fit2cloud merged commit 53a9940 into dev-v2 Mar 5, 2025
4 of 6 checks passed
@wanghe-fit2cloud wanghe-fit2cloud deleted the pr@dev-v2@website branch March 5, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants