-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for tables ContinuousBackup
#77
Add support for tables ContinuousBackup
#77
Conversation
Hi @msvechla. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
I'm able to set continuous backups to false and the backups are actually disabled on AWS side, however the controller keeps logging the following afterwards:
Setting backups to enabled is not working at all at the moment |
This could be some eventual consistency of the DDB API. Maybe try the |
24d29ad
to
d1bc057
Compare
I found the issue, I was reading the wrong results from the {
"ContinuousBackupsDescription": {
"ContinuousBackupsStatus": "ENABLED",
"PointInTimeRecoveryDescription": {
"PointInTimeRecoveryStatus": "DISABLED"
}
}
} I was checking against I also bumped the |
/ok-to-test |
@msvechla makes sense! |
From the logs looks like the controller is struggling to understand the diff between latest and desired
|
Are you sure? I actually like just having I have the refactoring ready, just let me know whether I should push |
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.
Thank you so much for working on this @msvechla - it's a great start! I left a few nit/comments below.
Also, it would be amazing if we can also have an e2e test case for this feature (very similar to the TTL ones)
pkg/resource/table/hooks.go
Outdated
@@ -187,6 +200,13 @@ func (rm *resourceManager) customUpdateTable( | |||
} | |||
} | |||
|
|||
if delta.DifferentAt("Spec.ContinuousBackups.PointInTimeRecoveryEnabled") { |
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.
Maybe also Spec.ContinuousBackups
- a user could completly delete PointInTimeRecoveryEnabled
to disable it.
@msvechla I initially thought that the call was Related to this topic: We are also working on multi-version support (renaming, moving fields will be possible, with mutating webhooks) |
Okay thats a valid point, then I will leave the spec as it is currently 👍 |
3df39b2
to
b425e70
Compare
I have added some e2e tests, maybe you can take a look. Otherwise my manual tests also worked great now |
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.
This is great @msvechla! I have two nits below and happy to merge right away
if a.ko.Spec.ContinuousBackups == nil && b.ko.Spec.ContinuousBackups != nil && | ||
b.ko.Spec.ContinuousBackups.PointInTimeRecoveryEnabled != nil { | ||
a.ko.Spec.ContinuousBackups = &v1alpha1.PointInTimeRecoverySpecification{ | ||
PointInTimeRecoveryEnabled: &DefaultPITREnabledValue, | ||
} | ||
} |
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.
👍
/retitle Add support for tables |
1857a0c
to
e41ee1c
Compare
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.
Dankeshoen @msvechla ! :)
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, msvechla The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can you please send a release PR once this is merged? we can go for |
Thanks for your guidance, will do. Can I just follow this example by bumping the versions in those files manually? https://github.com/aws-controllers-k8s/dynamodb-controller/pull/72/files Or is there some tooling around bumping the version? |
Exactly! Those files can be regenerated with new versions using something like Once the release PR is merged prow will take care of publishing new images/helm charts |
Thanks, created a release PR here: #78 |
Issue #, if available: #1790
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.