Skip to content

Conversation

@nnbu
Copy link
Contributor

@nnbu nnbu commented Jul 1, 2023

Issue (aws-controllers-k8s/community#1554)

Description of changes:
Adds support of tags in HostedZone spec

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I

@ack-prow ack-prow bot requested review from RedbackThomson and a-hilaly July 1, 2023 00:32
@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 1, 2023
@ack-prow
Copy link

ack-prow bot commented Jul 1, 2023

Hi @nnbu. 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.

@a-hilaly
Copy link
Member

a-hilaly commented Jul 5, 2023

/ok-to-test

@ack-prow ack-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 5, 2023
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nnbu!!
I have few comments/questions bellow

{{- $operationName := $specField.From.Operation }}
{{- $operation := (index $SDKAPI.API.Operations $operationName) -}}
{{- range $hostedZoneRefName, $hostedZoneMemberRefs := $operation.InputRef.Shape.MemberRefs -}}
{{- if eq $hostedZoneRefName "AddTags" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i get this well, AddTags is a field part of of CreateHostedZone operation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. To be specific, Tags is a field in HostedZone resource. operationName is ChangeTagsForResource. AddTags is memberRef in that operation.

@nnbu nnbu force-pushed the hostedzone branch 2 times, most recently from eec2108 to b8aae74 Compare July 8, 2023 01:25
@RedbackThomson RedbackThomson changed the title Route53: HostedZone spec should have tags support Add tags for HostedZone Jul 10, 2023
@nnbu
Copy link
Contributor Author

nnbu commented Jul 12, 2023

@a-hilaly I have addressed all the review comments. Could you please check?

route53_validator = Route53Validator(route53_client)
route53_validator.assert_hosted_zone(zone_id)

@pytest.mark.resource_data({'tag_key': 'initialtagkey', 'tag_value': 'initialtagvalue'})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I still don't understand the value in initialising tags in a decorator vs. doing it directly in the method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few instances of initializing tags this way in ec2-controller.
E.g. https://github.com/aws-controllers-k8s/ec2-controller/blob/main/test/e2e/tests/test_dhcp_options.py#L123

I kept the same convention.

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
/approve

@ack-prow ack-prow bot added the approved label Jul 17, 2023
@a-hilaly
Copy link
Member

/retest

@a-hilaly
Copy link
Member

/test all

@nnbu
Copy link
Contributor Author

nnbu commented Jul 17, 2023

e2e test failure seems unrelated.

Also, the test passes when I run it in my personal environment.

tests/test_hosted_zone.py::TestHostedZone::test_crud_tags
tests/test_hosted_zone.py::TestHostedZone::test_create_delete_public
tests/test_hosted_zone.py::TestHostedZone::test_create_delete_private
[gw1] [ 33%] PASSED tests/test_hosted_zone.py::TestHostedZone::test_create_delete_private
[gw0] [ 66%] PASSED tests/test_hosted_zone.py::TestHostedZone::test_create_delete_public
[gw2] [100%] PASSED tests/test_hosted_zone.py::TestHostedZone::test_crud_tags

@nnbu
Copy link
Contributor Author

nnbu commented Jul 19, 2023

@a-hilaly Could you please tell me if the test failure is a baseline breakage?

@a-hilaly
Copy link
Member

@nnbu this is an issue impacting all ACK controllers, we're tracking it here aws-controllers-k8s/community#1848

@a-hilaly
Copy link
Member

@nnbu fix is available checkout aws-controllers-k8s/community#1848 (comment)

Issue (aws-controllers-k8s/community#1554)

Description of changes:
Adds support of tags in HostedZone spec

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution @nnbu !
/lgtm
Can you make a release PR after this one is merged?

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@ack-prow
Copy link

ack-prow bot commented Jul 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, nnbu

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants