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

Use plugin registry instead of pluginClients and stageBasedPluingsMap in the controller, scheduler, and planner #5472

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ffjlabo
Copy link
Member

@ffjlabo ffjlabo commented Jan 8, 2025

What this PR does:

as title

Why we need it:

Until now, we use pluginClients and stageBasedPluingsMap in the controller, scheduler, planner to determine the plugin for the app.

However, we implemented the plugin registry in #5467 to determine the plugin used to deploy an app from the app config.

So, we will use it instead of pluginClients and stageBasedPluingsMap from now on.

Which issue(s) this PR fixes:

Part of #4980
Follows #5467 #5470

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 27.08333% with 35 lines in your changes missing coverage. Please review.

Project coverage is 26.19%. Comparing base (5bb4790) to head (cd47623).

Files with missing lines Patch % Lines
pkg/app/pipedv1/controller/planner.go 33.33% 16 Missing and 4 partials ⚠️
pkg/app/pipedv1/cmd/piped/piped.go 0.00% 11 Missing ⚠️
pkg/app/pipedv1/controller/controller.go 0.00% 3 Missing ⚠️
pkg/app/pipedv1/controller/scheduler.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5472      +/-   ##
==========================================
+ Coverage   26.17%   26.19%   +0.01%     
==========================================
  Files         458      458              
  Lines       49169    49172       +3     
==========================================
+ Hits        12871    12881      +10     
+ Misses      35275    35267       -8     
- Partials     1023     1024       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… in the controller, scheduler, and planner

Signed-off-by: Yoshiki Fujikane <[email protected]>
@ffjlabo ffjlabo force-pushed the use-plugin-registry branch from 47fc867 to 40c6c1e Compare January 8, 2025 12:48
@ffjlabo
Copy link
Member Author

ffjlabo commented Jan 8, 2025

FYI, I checked the behavior of the four cases with the patch. diff.patch

  • Only spec.pipeline
  • Only spec.plugins
  • Both spec.pipeline and spec.plugins
  • None of spec.pipeline and spec.plugins

It works as I expected.

Only spec.pipeline

QuickSync (via Web UI) PipelineSync (use K8S_SYNC as stage)
image image

Only spec.plugins

QuickSync (via Web UI)
image

Both spec.pipeline and spec.plugins

QuickSync (via Web UI) PipelineSync (use K8S_SYNC as stage)
image image

None of spec.pipeline and spec.plugins

QuickSync (via Web UI) , PipelineSync (use K8S_SYNC as stage)
image

@ffjlabo ffjlabo marked this pull request as ready for review January 9, 2025 03:46
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

Great. I commented about logging.

pkg/app/pipedv1/controller/planner.go Show resolved Hide resolved
pkg/app/pipedv1/controller/planner.go Show resolved Hide resolved
Signed-off-by: Yoshiki Fujikane <[email protected]>
@ffjlabo
Copy link
Member Author

ffjlabo commented Jan 9, 2025

@Warashi Thanks! I added the logs on cd47623 with more logs for refactoring purpose.

@ffjlabo ffjlabo requested a review from Warashi January 9, 2025 06:33
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants