-
Notifications
You must be signed in to change notification settings - Fork 175
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
Use loadModelWithLatestAPIVersion to load models for crossplane #237
Use loadModelWithLatestAPIVersion to load models for crossplane #237
Conversation
This fixes an issue where the crossplane command would fail to find API models for resources whose name differed between the model and API in the SDK. Previous behavior was to continue using the svcAlias instead of correctly using model_name from the configuration.
Hi @EdgeJ. 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 Once the patch is verified, the new status will be reflected by the 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. |
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.
All looks good except you should make a corresponding change to the README in the templates/crossplane/ directory here:
https://github.com/aws-controllers-k8s/code-generator/blob/main/templates/crossplane/README.md
which mentions the --provider-dir
CLI flag. :)
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.
Fantastic, thanks @EdgeJ!
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EdgeJ, 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 |
/ok-to-test |
This fixes an issue where the crossplane command would fail to find API
models for resources whose name differed between the model and API in
the SDK. Previous behavior was to continue using the svcAlias instead of
correctly using model_name from the configuration.
The changes here also have the added benefit of making the generateCrossplane function code more similar to other generation functions and utilize more of the common codebase.
Issue #, if available:
N/A
Description of changes:
Replace duplicated code in the generateCrossplane function with implementations in common.go and change variables to match the naming scheme used elsewhere.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.