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

Feature Enhancement: Enable Backup Instance creation for Microsoft.DataProtection #3736

Merged
merged 109 commits into from
Apr 18, 2024

Conversation

mayankagg9722
Copy link
Member

@mayankagg9722 mayankagg9722 commented Jan 23, 2024

What this PR does / why we need it:

This pull request introduces enhancement for Backup Instance creation for Microsoft.DataProtection. Additionally, we have added the necessary test recording that covers the creation, and deletion of these resources, namely Backup Instance with thorough validation.

Fixes #2345.

Special notes for your reviewer: Feature enhancement on top of already existing Microsoft.DataProtection CRDs.

How does this PR make you feel:

If applicable:

  • this PR contains documentation
  • this PR contains tests
  • this PR contains YAML Samples

Copy link
Member

@theunrepentantgeek theunrepentantgeek left a comment

Choose a reason for hiding this comment

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

You'll need to fix the sample, and include the recording of the test run.

@mayankagg9722
Copy link
Member Author

This is getting close to complete; once you've addressed the last couple of comments and rerecorded the test (after merging main, as discussed offline), we should be able to merge.

I have addressed all the comments. Merged with upstream main and regenerated and added test recordings.

@super-harsh
Copy link
Collaborator

/ok-to-test sha=2433622

@super-harsh
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

}

// give cluster msi access over snapshot rg for pv creation
clusterMSIRoleAssignmentAssignmentGUID, err := tc.Namer.GenerateUUID()
Copy link
Collaborator

@super-harsh super-harsh Apr 15, 2024

Choose a reason for hiding this comment

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

Consider moving these all reference resources to their own methods and return from there? Something like NewRoleAssignmentsForDataProtection...

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestions will make this improvement.

@matthchr
Copy link
Member

This fixes #2345

log.V(Debug).Info(fmt.Sprintf("Protection Status is %q", protectionStatus))

// return success for reconcilation if the state is non-retryable
if nonRetryableStates.Contains(protectionStatus) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would suggest inversing this logic here. We can always return success, if protectionStatus != "ProtectionError"

Copy link
Collaborator

Choose a reason for hiding this comment

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

that way, we're not checking the list each time during the reconcile.

@theunrepentantgeek
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@theunrepentantgeek
Copy link
Member

/ok-to-test sha=e66c3fd

@theunrepentantgeek theunrepentantgeek added this pull request to the merge queue Apr 18, 2024
Merged via the queue into Azure:main with commit baad899 Apr 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Feature: Add support for backup vault for storage accounts
4 participants