generate: make CSV generator for Go GVKs package-aware#4445
Merged
estroz merged 1 commit intooperator-framework:masterfrom Feb 2, 2021
Merged
generate: make CSV generator for Go GVKs package-aware#4445estroz merged 1 commit intooperator-framework:masterfrom
estroz merged 1 commit intooperator-framework:masterfrom
Conversation
owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
Member
Author
|
/assign @jmrodri |
jmrodri
approved these changes
Feb 2, 2021
Member
jmrodri
left a comment
There was a problem hiding this comment.
/lgtm
I would've preferred to see unit tests directly for the ast.go file but seems to be covered by the larger definitions_test.
| } | ||
|
|
||
| // findPackagePathForSelExpr returns the package path corresponding to the package name used in expr if it exists in im. | ||
| func (im importIdents) findPackagePathForSelExpr(expr *ast.SelectorExpr) (pkgPath string) { |
Member
There was a problem hiding this comment.
Nit: Not a fan of this method name but I don't have a better option :) so not blocking this PR.
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 4, 2021
…ework#4445) internal/generatel/clusterserviceversion/bases/definitions: make the owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 4, 2021
…ework#4445) internal/generatel/clusterserviceversion/bases/definitions: make the owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
Member
Author
|
/cherry-pick v1.3.x |
|
@estroz: new pull request created: #4480 DetailsIn response to this:
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. |
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
…ework#4445) internal/generatel/clusterserviceversion/bases/definitions: make the owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
…ework#4445) internal/generatel/clusterserviceversion/bases/definitions: make the owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com> Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
reinvantveer
pushed a commit
to reinvantveer/operator-sdk
that referenced
this pull request
Feb 5, 2021
…ework#4445) internal/generatel/clusterserviceversion/bases/definitions: make the owned CRD generator package- and type-aware so multiple packages containing the same type names can be used. Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com> Signed-off-by: Rein van 't Veer <reinvantveer@gmail.com> Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change:
Motivation for the change: currently the CSV generator indexes types in the struct-field hierarchy by type name only, which is potentially not unique between packages. This PR makes the generator package-aware.
Closes #4409
Closes #3744
/kind bug
Signed-off-by: Eric Stroczynski ericstroczynski@gmail.com
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs