-
Notifications
You must be signed in to change notification settings - Fork 203
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
Update ASO V2 dependencies #1648
Update ASO V2 dependencies #1648
Conversation
obj = obj.DeepCopyObject() | ||
obj = obj.DeepCopyObject().(client.Object) | ||
|
||
gr.Log.V(0).Info("Reconcile invoked", "kind", fmt.Sprintf("%T", obj)) |
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.
minor: Is there a cleaner way to log the type being reconciled in the logr.Logger
interface (since it doesn't support format specifiers?)
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.
The best suggestion I have is to break out an intention revealing local:
gr.Log.V(0).Info("Reconcile invoked", "kind", fmt.Sprintf("%T", obj)) | |
objKind := fmt.Sprintf("%T", obj) | |
gr.Log.V(0).Info("Reconcile invoked", "kind", objKind) |
Another way would be to introduce a function on each of our generated types that generates a description to use here, but that's a lot of overhead.
@@ -6,18 +6,39 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK | |||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= | |||
cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= | |||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= | |||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= |
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.
Sure whatever you say golang
67973aa
to
f32ed3c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1648 +/- ##
==========================================
- Coverage 66.97% 66.97% -0.01%
==========================================
Files 205 205
Lines 14818 14824 +6
==========================================
+ Hits 9925 9929 +4
- Misses 4134 4137 +3
+ Partials 759 758 -1
Continue to review full report at Codecov.
|
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.
A couple of questions, but nothing of import.
knownTypes := getKnownStorageTypes() | ||
|
||
knownTypes = append(knownTypes, new(resources.ResourceGroup)) | ||
|
||
return knownTypes | ||
} | ||
|
||
func GetKnownTypes() []runtime.Object { | ||
func GetKnownTypes() []client.Object { |
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.
What's the difference between runtime.Object
and client.Object
and why the change?
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.
client.Object
is actually a combo of runtime.Object
and metav1.Object
. You can see them explain it here.
This is actually a nice win because we actually want to make sure all of our CRD types are client.Object
(have both runtime,Object
and metav1.Object
), so using this everywhere we can helps ensure that.
They also obviously changed the signatures of a lot of the client
methods we use to expect it.
obj = obj.DeepCopyObject() | ||
obj = obj.DeepCopyObject().(client.Object) | ||
|
||
gr.Log.V(0).Info("Reconcile invoked", "kind", fmt.Sprintf("%T", obj)) |
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.
The best suggestion I have is to break out an intention revealing local:
gr.Log.V(0).Info("Reconcile invoked", "kind", fmt.Sprintf("%T", obj)) | |
objKind := fmt.Sprintf("%T", obj) | |
gr.Log.V(0).Info("Reconcile invoked", "kind", objKind) |
Another way would be to introduce a function on each of our generated types that generates a description to use here, but that's a lot of overhead.
f32ed3c
to
456bef7
Compare
No description provided.