Skip to content
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

control-service: move cron jobs methods to the data jobs class #2291

Merged

Conversation

murphp15
Copy link
Collaborator

Why

At the moment the KubernetesService class as much to much responsibilities.
It is extended by DataJobsKubernetesService and controlKubernetesService class.
However it includes the logic that is unique to those individual classes also.
For example only the datajobsKS creates or deploys cron jobs.
So in this PR I move those external facing functions to the dataJobsclass and fix the tests.

I have not move alot of the more private functions to the datajobs class yet because alot of other tests need to be changed to achieve this as they are being tested using reflection and I want to keep the PRs small.

How has this been tested?

Locally.

Signed-off-by: murphp15 [email protected]

Copy link
Contributor

@gabrielgeorgiev1 gabrielgeorgiev1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just because I dont want to cross-reference 200 loc, the methods are the same, they're just moved to the subclass, correct?

@murphp15
Copy link
Collaborator Author

Just because I dont want to cross-reference 200 loc, the methods are the same, they're just moved to the subclass, correct?

Correct!

@murphp15 murphp15 merged commit 47d35dd into main Jun 21, 2023
@murphp15 murphp15 deleted the person/murphp15/move_cron_job_methods_to_data_jobs_class branch June 21, 2023 11:14
mivanov1988 pushed a commit that referenced this pull request Jun 21, 2023
# Why
At the moment the KubernetesService class as much to much
responsibilities.
It is extended by DataJobsKubernetesService and controlKubernetesService
class.
However it includes the logic that is unique to those individual classes
also.
For example only the datajobsKS creates or deploys cron jobs.
So in this PR I move those external facing functions to the
dataJobsclass and fix the tests.


I have not move alot of the more private functions to the datajobs class
yet because alot of other tests need to be changed to achieve this as
they are being tested using reflection and I want to keep the PRs small.

 
# How has this been tested?
Locally. 


Signed-off-by: murphp15 <[email protected]>

---------

Co-authored-by: github-actions <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants