-
Notifications
You must be signed in to change notification settings - Fork 138
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(ec2): fix ipv6 field issues in ec2 group #109
Conversation
/test-examples="examples/ec2/instance.yaml,examples/ec2/networkinterface.yaml" |
/test-examples="examples/ec2/instance.yaml,examples/ec2/networkinterface.yaml" |
@haarchri Do you see Uptest passing in your local? |
61e4834
to
d63a1fe
Compare
/test-examples="examples/ec2/instance.yaml" |
/test-examples="examples/ec2/networkinterface.yaml" |
Rebased this PR on the latest main and triggered tests individually 🤞 |
/test-examples="examples/ec2/instance.yaml" |
/test-examples="examples/ec2/networkinterface.yaml" |
@haarchri would you mind signing the CLA? |
Required status checks have been changed, could you please rebase this PR? |
@haarchri Could you please rebase this PR? And also for a successful uptest, could you please fix the example manifest of this resource by adding a subnet reference? Thank you :) |
@sergenyalcin yes i will do this |
d63a1fe
to
b5e24f1
Compare
update the examples:
|
/test-examples="examples/ec2/instance.yaml" |
@sergenyalcin @jeanduplessis done ! test is green - please check again - sorry for late answer |
c62def8
to
f4cdb59
Compare
Signed-off-by: Christopher Paul Haar <[email protected]>
f4cdb59
to
53c7f77
Compare
Signed-off-by: Christopher Paul Haar <[email protected]>
/test-examples="examples/ec2/instance.yaml" |
config/ec2/config.go
Outdated
@@ -173,7 +175,7 @@ func Configure(p *config.Provider) { | |||
} | |||
r.LateInitializer = config.LateInitializer{ | |||
IgnoredFields: []string{ | |||
"interface_type", "private_ip_list", "private_ips", | |||
"interface_type", "private_ip_list", "private_ips", "ipv6_address_count", |
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.
"interface_type", "private_ip_list", "private_ips", "ipv6_address_count", | |
"interface_type", "private_ip_list", "private_ips", ipv6_addresses, "ipv6_address_count", |
I think we usually include both conflicting fields in the IgnoredFields slice.
@ulucinar @sergenyalcin please keep me honest 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.
Yes, agreed. When the native schema declares two configuration arguments as mutually exclusive, we need to ignore them both during late-initialization because we may have set either of them under spec.forProvider
and the unset one could be late-initialized at runtime causing a conflict. The argument ipv6_addresses
is declared to conflict with the ipv6_address_count
and similarly, ipv6_address_count
is declared to conflict with with ipv6_addresses
.
In this specific case, the relationship is mutual, i.e., ipv6_addresses
& ipv6_address_count
are mutually exclusive as dictated in the native (Terraform) schema. In theory, this may not always be true (consider a case in which if argument a
is set then b
gets initialized from a
but the reverse is not true, i.e., if b
is set, a
does not get initialized). I don't know any practical examples of this and I think we had better assume a mutual relationship for late-initialization.
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.
Included ipv6_addresses
to IgnoredFields
.
/test-examples="examples/ec2/instance.yaml" |
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.
Verified with uptest run.
Signed-off-by: Christopher Paul Haar [email protected]
Description of your changes
we tested today upbound/provider-aws and found 2 issues regarding ipv6 fields in aws_instance and aws_network_interface - looks like this issue has open PRs in crossplane-contrib/provider-jet-aws as well
crossplane-contrib/provider-jet-aws#227
crossplane-contrib/provider-jet-aws#228
Fixes #
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
apply instance with network interface