Skip to content
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 primary keys for generator #33

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

arjunrn
Copy link
Contributor

@arjunrn arjunrn commented Apr 19, 2023

The following resources have ARNs which are set at the primary key:

Issue aws-controllers-k8s/community#1778

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

@ack-prow ack-prow bot requested review from jaypipes and RedbackThomson April 19, 2023 07:47
@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 Apr 19, 2023
@ack-prow
Copy link

ack-prow bot commented Apr 19, 2023

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

Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

@arjunrn I don't see any Go code changes after you changed the generator.yaml file, but I do see that you regenerated the controller (since the apis/v1alpha1/ack-generate-metadata.yaml file was updated). So... that tells me that adding these configurations to these fields in the generator.yaml file did not actually have any effect on the generated Go code. This could indicate that for these resources, the SetIdentifiers code path was already working fine by default and that adding the is_arn_primary_key configuration option is mostly just a documentation thing. Is that your understanding as well?

@arjunrn
Copy link
Contributor Author

arjunrn commented Apr 19, 2023

@jaypipes It's not changing anything right now because the version of the code generator I used is the one which is currently released and doesn't have the changes I added in aws-controllers-k8s/code-generator#439 . In the current version of the code generator the set identifier is skipped. I added these fields so that when the bot updates the code generator there are no errors during generation because the primary keys cannot be found. I can also update the generator version in this PR and run the generation again. But I assume that's not generally done.

@jaypipes
Copy link
Collaborator

@jaypipes It's not changing anything right now because the version of the code generator I used is the one which is currently released and doesn't have the changes I added in aws-controllers-k8s/code-generator#439 . In the current version of the code generator the set identifier is skipped. I added these fields so that when the bot updates the code generator there are no errors during generation because the primary keys cannot be found. I can also update the generator version in this PR and run the generation again. But I assume that's not generally done.

@arjunrn go ahead and regenerate the controller using the version of code-generator that has your fixes :)

@arjunrn
Copy link
Contributor Author

arjunrn commented Apr 19, 2023

@jaypipes Updated. There are some other changes from the generator as well.

Copy link
Collaborator

@jaypipes jaypipes 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 @arjunrn!

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

/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 Apr 19, 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.

/lgtm

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

ack-prow bot commented Apr 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, arjunrn, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit 3470eef into aws-controllers-k8s:main Apr 24, 2023
@arjunrn arjunrn deleted the add-primary-keys branch April 24, 2023 13:04
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