-
Notifications
You must be signed in to change notification settings - Fork 702
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
[kubeapps-apis] Apply renaming at the code #2971
[kubeapps-apis] Apply renaming at the code #2971
Conversation
Conflicts: cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages.pb.go cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages.pb.gw.go cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages_grpc.pb.go cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.gw.go cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2_grpc.pb.go cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller.pb.go cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller.pb.gw.go cmd/kubeapps-apis/proto/kubeappsapis/core/packages/v1alpha1/packages.proto cmd/kubeapps-apis/proto/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto
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.
Great, thanks for jumping on to this straight away. I'm leaving a +1 as even in its current state (with tests commented out) it'd be better than broken master, but great if you get the tests updated too first.
@@ -23,7 +23,7 @@ import ( | |||
"k8s.io/client-go/dynamic" | |||
|
|||
corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" | |||
"github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1" | |||
v1alpha1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1" |
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.
You should only need an explicit name for the imported module if you're using something other than the default name of "v1alpha1" here?
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.
Mmm, I don't know either, I think I just auto-imported with vs code, but, yep, you're right, the explicit name is no required at all. Thank you!
@@ -33,7 +33,7 @@ import ( | |||
log "k8s.io/klog/v2" | |||
|
|||
corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" | |||
"github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1" | |||
v1alpha1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1" |
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.
Same here, unsure why you're adding an explicit name for the import when it matches the default?
@@ -21,6 +21,7 @@ import ( | |||
"github.com/google/go-cmp/cmp" | |||
"github.com/google/go-cmp/cmp/cmpopts" | |||
corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" | |||
v1alpha1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1" |
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.
Same here.
Mmmm, I can't say I share @absoludity sentiment on this. I just discovered this PR and am a bit horrified at the upcoming merge I will need to perform in fluxv2 plugin server code, where I have been making changes for several days now. I am not asking you not to go ahead with this PR, but I AM saying it would have been nice to notify me ahead of time, as I own fluxv2 plug in and you're making major changes there. Would have saved me cycles not to make changes to the same file. Plus, I think its a bit premature to be making these changes at this point. The design spec is far from reviewed let alone approved. |
I totally understand your concerns, it's true we have performed a lot of changes here (especially in #2945), but the vast majority are almost automatic replacements. That said, I don't mind when you send the PR, I can just jump in and edit your PR adding these changes back again. However, let me know if I'm wrong, but all the information about the current status of the tasks has been updated in real-time in our source of truth board: https://github.com/kubeapps/kubeapps/projects/11
Our approach here has been just trying to perform laser-focused changes just in AvailablePackage and InstalledPackage, so we minimize the number of changes in each step. What would you suggest here? |
Argh... sorry @gfichtenholt, I thought you and I did talk about this during our call (with Dimitri) earlier when I mentioned that @antgamdia would be updating the naming in the core.packages.v1alpha1 which would affect the plugins. I was perhaps not clear enough, sorry. Do you remember the conversation though? (you said something along the lines of not minding as long as you're not blocking anyone, from memory, but sounds like I hadn't communicated clearly that it would involve). If you want to ignore the change and just continue on your branch, then push it as a draft PR, I'm happy to resolve the conflicts.
I thought I did :/
The design spec as a whole, yes, but the core.packages.v1alpha1 messages are something I have been working hard to whittle down to something we agree on, for this reason - this is #2944 that I'd assigned to myself for this iteration and estimated 3-4 days. The task Antonio is doing is #2945 which I initiated as a card (Antonio converted that to an issue) and I outlined in the first comment there how I'd suggest progressing (which is exactly what Antonio has done). Both of these are pre-requisites to #2946 which is where I assume you'd be continuing working on the flux plugin. Not an excuse for lack of clear communication, but another idea too: It might be worth subscribing to comments on all issues so you can voice your thoughts and contribute while we're all planning these too. |
@absoludity yeah, wasn't clear to me the extent of the changes. Possibly my bad. |
Description of the change
This is a
draftPR with a bunch of changes required after #2965. The motivation is to avoid other being blocked because of the breaking changes. So, if you are a plug-in developer, please feel free to add some of these changes in your local.I've also modified a couple of tests, they are just minor changes introducing the
corev1.Context{}
object to avoid nil references.Tomorrow I will continue updating so the test suite passes.Benefits
Code will work again in the main branch
Possible drawbacks
I haven't thoroughly tested all the methods, but it's worthwhile just to land something working and send a followup PR with further changes if needed.
Applicable issues
Additional information
Note that, due to the renaming, if testing the API using the non gRPC endpoint, the query params
?namespace=xx
and?cluster=yy
became renamed to?context.namespace=xx
and?context.cluster=yy