-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: WIP add control etc crds #46
Conversation
PR Analysis
PR Feedback
How to use
|
@vladklokun as discussed, I've been working on this for the past week, right now I'm stuck a bit as I just can't seem to be able to successfully run the The script always seems to error out/give out warnings? Not even sure what they are, every time I run it but can't seem to generate the required deepcopy methods, also why they are not present in the PR. I've looked for solutions online but can't seem to get it working still, any help regarding this would be extremely helpful! Thanks! |
Yes, the script always generates warnings when running, even after successfully generating deep copy methods, converters and OpenAPI definitions. That’s normal. You can tell your script ran okay-ish when it generates all the methods you need. Regarding the missing methods, I know it might sound exotic, but where have you cloned your project? There is a catch with |
I did check this earlier as well, but that doesn't seem to be the case either, any things I should try and troubleshoot? I was going to take a fresh look at it later again today :) |
@vladklokun finally got the codegen working, could you maybe take a look and let me know if I've missed something before I go ahead and resolve the merge conflicts? Thanks! |
PR Analysis
How to use
|
Hi! I finally had a chance to look at the PR. Thank you for your patience. Type definitions and wiring look good to me. However, we just merged a PR that includes changes to codegen. Please rebase and try to fix conflicts with the base branch and try to verify that the Custom Resources work. A good start to manually test this would be to create example Custom Resources in the |
Sure! Will do that and get back to you on this. Thanks! |
Signed-off-by: DRAGON <[email protected]>
@vladklokun have made the required changes! Thanks! |
@XDRAGON2002 Can you please commit the |
@dwertent Completely forgot about that! Thanks! Done! |
This is weird, the tests still failed due to the Edit: Most probably got it, I was using go1.20 whereas some new packages require 1.21, did the change updated everything and pushed, should pass now. |
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.
Other than formatting and the apimachinery
bump, LGTM. But before anyone approves, we need to make sure the apimachinery
bump actually works with all of our clients importing the Storage and doesn’t break anything.
metav1.TypeMeta | ||
metav1.ListMeta | ||
Items []ControlConfiguration | ||
} |
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.
chore: fix line endings in PR
Please see the sign after this line. It indicates that the files have improper line endings at the end: they don’t have the terminating \n
characters. I believe it’s because you’re using Visual Studio Code or some other IDE that terminates the files with Windows line endings.
Please refer to this issue: microsoft/vscode#141169
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.
I'll fix this,
also the fact that VSC does this is just concerning, I'd at least hope to have my tooling follow standards :(
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.
Yeah, that’s a common problem. Nonetheless, we could always add a Git pre-commit hook to fix the line endings automatically or a linter to complain about it. But as you can imagine, this is very low on our priorities list :)
Signed-off-by: DRAGON <[email protected]>
@vladklokun @dwertent I'm pretty sure the tests will fail again, I can't seem to figure out why it is so. Any help would be much appreciated! |
PR Type:
Enhancement
PR Description:
This PR introduces several new Custom Resource Definitions (CRDs) and their related functionalities:
For each of these CRDs, the PR includes the necessary conversion functions for the software composition scheme. It also updates the clientset, listers, and informers to handle these new CRDs.
PR Main Files Walkthrough:
files:
pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go
: Added conversion functions for the new CRDs (Control, Rule, Framework, Exception).pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/controlconfiguration.go
: Updated the clientset to handle the new ControlConfiguration CRD.pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/framework.go
: Updated the clientset to handle the new Framework CRD.pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/exception.go
: Updated the clientset to handle the new Exception CRD.pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/rule.go
: Updated the clientset to handle the new Rule CRD.pkg/apis/softwarecomposition/v1beta1/types.go
: Added definitions for the new CRDs (Control, Rule, Framework, Exception).pkg/generated/informers/externalversions/softwarecomposition/v1beta1/controlconfiguration.go
: Updated the informers to handle the new ControlConfiguration CRD.pkg/generated/informers/externalversions/softwarecomposition/v1beta1/exception.go
: Updated the informers to handle the new Exception CRD.pkg/generated/informers/externalversions/softwarecomposition/v1beta1/framework.go
: Updated the informers to handle the new Framework CRD.pkg/generated/informers/externalversions/softwarecomposition/v1beta1/rule.go
: Updated the informers to handle the new Rule CRD.