Fix VPC optional DNS attribute handling
Issue #: aws-controllers-k8s/community#1826
Description of changes: Only sync optional fields, if actually configured. More details are in the commit message.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hi @gfrey. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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 wondering whether this should be accompanied by other changes:
- The tests by default set the attributes. This would cover up any regression, when they are required to be set (as they are right now).
- Documentation should maybe highlight these values have defaults. If so, I would need some guidance on how to best do those changes.
/ok-to-test
@gfrey: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ec2-verify-attribution | 3ebf6f911692ff11a8361bf6239ab67b8fc3652a | link | false | /test ec2-verify-attribution |
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.
Thanks @gfrey ! This looks good to me! QQ: what's the behaviour you're trying to eliminate here? i think the idea was to let people remove the DNS attributes by deleting the field.
Thanks @gfrey ! This looks good to me! QQ: what's the behaviour you're trying to eliminate here? i think the idea was to let people remove the DNS attributes by deleting the field.
@a-hilaly I was trying to create a minimal setup. From the documentation the only required field was the CIDR block, but it was failing because of this. Also the linked issue made me believe this is not the wanted behavior.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: a-hilaly, gfrey
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [a-hilaly]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@gfrey i have second thoughts on this. While it indeed gonna work. There is still a tiny problem: the controller will still detect a delta on those two fields, ideally what we can do to even avoid getting a delta is, having a customprecompare function, that takes into consideration default fields. For example we can do something similar to https://github.com/aws-controllers-k8s/efs-controller/blob/main/pkg/resource/file_system/hooks.go#L310-L318
@gfrey i have second thoughts on this. While it indeed gonna work. There is still a tiny problem: the controller will still detect a delta on those two fields, ideally what we can do to even avoid getting a delta is, having a customprecompare function, that takes into consideration default fields. For example we can do something similar to https://github.com/aws-controllers-k8s/efs-controller/blob/main/pkg/resource/file_system/hooks.go#L310-L318
@a-hilaly Thanks for the pointer, will take a look tomorrow and prepare a second PR.
Thank you Gereon!! :)