-
Notifications
You must be signed in to change notification settings - Fork 51
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
correct delta_pre_compare for DBInstance #109
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.
👍
e2e test failure is normal here, should be fixed in #108 |
|
/test rds-unit-test |
In PR aws-controllers-k8s#95, we added a `customPreCompare` function to `pkg/resource/db_instance/hooks.go` and changed the `generator.yaml` to use a code snippet instead of the `templates/hooks/db_instance/delta_pre_compare.go.tpl` template file. However, we did not delete the `templates/hooks/db_instance/delta_pre_compare.go.tpl` file and when I went to do the updating DB instance tags patch, mobody noticed that I had added a call to `compareTags` into the (now-unused) template file. This meant that `compareTags` is never called which means changes to tags were not being properly on DBInstance resources. This patch moves all the custom code for delta pre-checks back into the template file and gets rid of the custom code snippet in generator.yaml, consolidating all this logic into the template file. Signed-off-by: Jay Pipes <jaypipes@gmail.com>
@@ -197,7 +198,7 @@ def test_crud_postgres14_t3_micro( | |||
k8s.patch_custom_resource(ref, updates) | |||
time.sleep(MODIFY_WAIT_AFTER_SECONDS) | |||
|
|||
latest_tags = db_instance.get_tags(arn) | |||
latest_tags = tag.clean(db_instance.get_tags(arn)) |
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.
Good catch. Merging since the test failures are not accurate.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, jaypipes 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 |
/test rds-unit-test |
@jaypipes: The following tests failed, say
Full PR test history. Your PR dashboard. 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 understand the commands that are listed here. |
Looks like gopkg.in/yaml.v2 is having some issues. Tracking the problem here niemeyer/gopkg#78 |
In PR #95, we added a
customPreCompare
function topkg/resource/db_instance/hooks.go
and changed thegenerator.yaml
touse a code snippet instead of the
templates/hooks/db_instance/delta_pre_compare.go.tpl
template file.However, we did not delete the
templates/hooks/db_instance/delta_pre_compare.go.tpl
file and when Iwent to do the updating DB instance tags patch, nobody noticed that I
had added a call to
compareTags
into the (now-unused) template file.This meant that
compareTags
is never called which means changes totags were not being properly on DBInstance resources.
This patch moves all the custom code for delta pre-checks back into the
template file and gets rid of the custom code snippet in generator.yaml,
consolidating all this logic into the template file.
Issue: aws-controllers-k8s/community#1276
Signed-off-by: Jay Pipes jaypipes@gmail.com
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.