Skip to content

Reduce complexity around client.object type switches #1456

Closed
@bjee19

Description

@bjee19

Is your enhancement request related to a problem? Please describe.
In many parts of the codebase, 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. Documentation on the difference between these two variables is far abstracted from where they are used, thus leading to the potential for a reader to think the variables are the same.

What would you like to be added:
Create a new type like type ObjectType client.Object and refactor the codebase to use this type in all situations where objType is being used.

Why this is needed:
There will be more code clarity and less chance that an argument could be used incorrectly.

Additional context
Issue was opened from discussion in this PR Here

Acceptance Criteria:

  • Refactor codebase to use new ObjectType type.

Metadata

Metadata

Assignees

Labels

backlogCurrently unprioritized work. May change with user feedback or as the product progresses.good first issueGood for newcomerstech-debtShort-term pain, long-term benefit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions