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

Enhancement: Refactor controller syncHandler() method #206

Open
senthilrch opened this issue Mar 11, 2023 · 0 comments
Open

Enhancement: Refactor controller syncHandler() method #206

senthilrch opened this issue Mar 11, 2023 · 0 comments
Assignees
Labels
done Code pushed to develop branch enhancement Enhancement to existing feature
Milestone

Comments

@senthilrch
Copy link
Owner

The syncHandler() method of the controller is where the controller reconciles the desired state of ImageCache with actual state. The syncHandler, before starting the reconciliation, updates the status of ImageCache (interim status) to Processing.

The business logic to update the status is currently within the syncHandler() method, with some amount of boiler plate. the logic to construct the status variable is best moved to separate methods of the controller. Proposal is to have two different methods:-

  • createStatusProcessing() generates the interim status
  • createStatusFinal() generates the final status
@senthilrch senthilrch added the enhancement Enhancement to existing feature label Mar 11, 2023
@senthilrch senthilrch added this to the v0.11.0 milestone Mar 11, 2023
@senthilrch senthilrch self-assigned this Mar 11, 2023
@senthilrch senthilrch added the done Code pushed to develop branch label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Code pushed to develop branch enhancement Enhancement to existing feature
Projects
None yet
Development

No branches or pull requests

1 participant