-
Notifications
You must be signed in to change notification settings - Fork 96
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
Refacter code to use new ObjectType #2121
Conversation
5407df1
to
a62a090
Compare
Problem: We currently use the variable objType to refer to a client.Object's type (skeleton of an object). We also use the variable obj to refer to a full client.Object (object with fields filled out). However, in many parts of the codebase these two variables are used closely together and are both of type client.Object which can be a little confusing. Solution: I created a new type called ObjectType and refactored the codebase to utilize it.
a62a090
to
9038ea2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2121 +/- ##
=======================================
Coverage 87.61% 87.61%
=======================================
Files 96 96
Lines 6694 6695 +1
Branches 50 50
=======================================
+ Hits 5865 5866 +1
Misses 773 773
Partials 56 56 ☔ View full report in Codecov by Sentry. |
Let's also use the new type in the following places:
@pleshakov or @bjee19 any other places we should update this type? |
looks good to me! couldn't find any other places, @sarthyparty good job on being thorough! |
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 🚀
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.
🚀 🚀 🚀
Proposed changes
Problem: We currently use the variable objType to refer to a client.Object's type (skeleton of an object). We also use the variable obj to refer to a full client.Object (object with fields filled out). However, in many parts of the codebase these two variables are used closely together and are both of type client.Object which can be a little confusing.
Solution: I created a new type called ObjectType and refactored the codebase to utilize it.
Closes #1456
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.