-
Notifications
You must be signed in to change notification settings - Fork 203
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 BackupVaults/BackupInstance extension to exit early on terminal states #4180
Conversation
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.
Is there a test that could cover this case/issue?
"github.com/Azure/azure-service-operator/v2/internal/util/to" | ||
"github.com/Azure/azure-service-operator/v2/pkg/genruntime" | ||
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" | ||
) | ||
|
||
var _ extensions.PostReconciliationChecker = &BackupVaultsBackupInstanceExtension{} | ||
|
||
var protectionError = "ProtectionError" | ||
var terminalStates = set.Make( |
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.
Can you add some documentation about how we determined this list, and what exactly it means to be terminal here?
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.
These are the states listed and we do no foresee any frequent changed here as these states are not usually changed.
Public Doc: (might not be updated with latest swagger)
https://learn.microsoft.com/en-us/rest/api/dataprotection/backup-instances/get?view=rest-dataprotection-2024-04-01&tabs=HTTP#status
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.
Adding these URLs as comments would be useful, so that a future maintainer can go verify if things change in the future.
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.
Done!
Closes #4135
What this PR does / why we need it:
Fix BackupVaults/BackupInstance extension to exit early on terminal states. Most of the changes are reverted from commit which introduced the bug.