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

feat(xo-web/backup): add 'report recipients' when creating a metadata backup #7776

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

MelissaFrncJrg
Copy link
Contributor

@MelissaFrncJrg MelissaFrncJrg commented Jun 26, 2024

Description

Do not squash

Fixes #7569
image

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

packages/xo-web/src/xo-app/backup/new/metadata/index.js Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
Copy link
Member

@MathieuRA MathieuRA left a comment

Choose a reason for hiding this comment

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

After some testing, the email does not seem to be sent correctly.

You also need to add some changes in the xo-server-backup-reports plugin.

// packages/xo-server-backup-reports/src/index.js

Class BackupReportsXoPlugin {
...

    async _metadataHandler(log, { name: jobName, settings }, schedule, force) {
       const xo = this._xo
    
       const mailReceivers = get(() => settings[''].reportRecipients)
       ...
    
       return this._sendReport({
          ...
          mailReceivers,
       })
    }
}

Copy link
Member

@MathieuRA MathieuRA left a comment

Choose a reason for hiding this comment

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

Rebase then OK for me

Copy link
Member

@pdonias pdonias left a comment

Choose a reason for hiding this comment

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

Please rebase to resolve conflicts in xo-server-backup-reports

CHANGELOG.unreleased.md Show resolved Hide resolved
Copy link
Member

@pdonias pdonias left a comment

Choose a reason for hiding this comment

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

I am getting a task.tasks is not iterable error. Do you reproduce?

@MathieuRA
Copy link
Member

I am getting a task.tasks is not iterable error. Do you reproduce?

No errors on my side

@MathieuRA MathieuRA force-pushed the addRecipientsInBackupMetadata branch 2 times, most recently from 32c092b to 05d1f46 Compare July 23, 2024 11:27
@MathieuRA
Copy link
Member

I am getting a task.tasks is not iterable error. Do you reproduce?

Fixed.
Since the error is already present on master and is not directly related to this PR, I created a separate commit in the PR.

@MathieuRA MathieuRA requested a review from pdonias July 23, 2024 11:29
@pdonias pdonias force-pushed the addRecipientsInBackupMetadata branch from 05d1f46 to 02e68b9 Compare July 25, 2024 09:46
@pdonias pdonias requested a review from MathieuRA July 25, 2024 09:47
@MathieuRA MathieuRA force-pushed the addRecipientsInBackupMetadata branch 2 times, most recently from f93d937 to 37eb8a5 Compare July 25, 2024 10:12
@pdonias pdonias force-pushed the addRecipientsInBackupMetadata branch from 37eb8a5 to 22e5bfc Compare July 25, 2024 11:54
@pdonias pdonias merged commit d614298 into master Jul 25, 2024
1 check passed
@pdonias pdonias deleted the addRecipientsInBackupMetadata branch July 25, 2024 11:59
pdonias added a commit that referenced this pull request Jul 25, 2024
MathieuRA pushed a commit that referenced this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup of metadata is missing settings options for reporting failures.
3 participants