Skip to content

[K8s Plugin] Refactor to use LoadConfigSpec to load application config #5733

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

Closed
wants to merge 3 commits into from

Conversation

Warashi
Copy link
Contributor

@Warashi Warashi commented Apr 11, 2025

What this PR does:

This PR does a refactoring to use sdk.LoadConfigSpec instead of configv1.DecodeYAML

Why we need it:

We don't want to import the configv1 package under plugin implementation because it is not a package for plugin implementation.

Which issue(s) this PR fixes:

Part of #5530
Follows #5731

Does this PR introduce a user-facing change?: No

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

this usecase is for the case to construct the application config, so we cannot use LoadConfigSpec.

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
@Warashi Warashi force-pushed the plugins-config-spec-load-sdk branch from 9747a59 to 9b08b7d Compare April 11, 2025 00:52
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 46.87500% with 17 lines in your changes missing coverage. Please review.

Project coverage is 26.96%. Comparing base (b6c89b1) to head (09b1c1a).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...app/pipedv1/plugin/kubernetes/deployment/plugin.go 20.00% 7 Missing and 1 partial ⚠️
...p/pipedv1/plugin/kubernetes/deployment/rollback.go 66.66% 1 Missing and 2 partials ⚠️
...g/app/pipedv1/plugin/kubernetes/deployment/sync.go 70.00% 1 Missing and 2 partials ⚠️
.../app/pipedv1/plugin/kubernetes/livestate/plugin.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5733   +/-   ##
=======================================
  Coverage   26.96%   26.96%           
=======================================
  Files         503      503           
  Lines       53024    53023    -1     
=======================================
+ Hits        14297    14298    +1     
+ Misses      37663    37660    -3     
- Partials     1064     1065    +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Warashi Warashi marked this pull request as ready for review April 11, 2025 00:59
@Warashi Warashi enabled auto-merge (squash) April 14, 2025 07:49
@Warashi Warashi marked this pull request as draft April 17, 2025 05:46
auto-merge was automatically disabled April 17, 2025 05:46

Pull request was converted to draft

@Warashi
Copy link
Contributor Author

Warashi commented Apr 17, 2025

I implemented config unmarshalling before invoking the plugin implementation in #5740, so this is no longer needed.

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