-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
cmd/operator-sdk/internal/genutil: relax version dir check in parseGroupVersions()
#1525
Conversation
7e02cba
to
0df254f
Compare
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.
LGTM
Before merging, we should double check with @awgreene that this solves his problem. |
Thanks for working on this @joelanford and @estroz! I pulled the
I then ran the following command:
It looks like the shared dir was inspected, but there was no code generated. Any thoughts? |
@awgreene do you have Also you might have to embed the following in type Phase struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
...
} While testing with your code I got compilation errors because |
Thanks for looking into this @estroz, is there a reason why this needs to be added if it's moved into it's own package? When |
@awgreene can you link the rest of your code? |
awgreene/operator-marketplace@7d6b64f I copied the old deepcopy code into this commit earlier but the only change other change involved moving the |
Ah I see the issue. The above code has |
Great - adding the doc file seems to have fixed everything! Thanks @estroz |
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.
LGTM
…roupVersions()` (operator-framework#1525) * cmd/operator-sdk/internal/genutil: relax version dir check in parseGroupVersions() * CHANGELOG.md: add change for relaxing API version format check
Description of the change: remove requirement that the API dir structure
pkg/apis/<group>/<version>
have<version>
match something likev1alpha1
, and instead check if<version>
is a dir (or dir hierarchy) that contains files.Motivation for the change: having a API dir shared by multiple versions, ex
pkg/apis/operators/shared
, is valid and should be considered when running a code generator.