Skip to content

[K8s Plugin] Remove unnecessary func and if-else#5998

Merged
Warashi merged 3 commits into
masterfrom
k8s-plugin-remove-unused
Jul 4, 2025
Merged

[K8s Plugin] Remove unnecessary func and if-else#5998
Warashi merged 3 commits into
masterfrom
k8s-plugin-remove-unused

Conversation

@Warashi
Copy link
Copy Markdown
Member

@Warashi Warashi commented Jul 4, 2025

What this PR does:

as title

Why we need it:

to hardening codebase

Which issue(s) this PR fixes:

Part of #5764

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):

Warashi added 3 commits July 4, 2025 10:08
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
@Warashi Warashi requested a review from a team as a code owner July 4, 2025 01:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.16%. Comparing base (8d9d755) to head (695cd92).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5998      +/-   ##
==========================================
- Coverage   28.23%   28.16%   -0.08%     
==========================================
  Files         519      519              
  Lines       56017    55937      -80     
==========================================
- Hits        15818    15756      -62     
+ Misses      38945    38931      -14     
+ Partials     1254     1250       -4     
Flag Coverage Δ
. 23.22% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes 66.27% <ø> (-0.16%) ⬇️
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 67.33% <ø> (-0.18%) ⬇️
.-pkg-app-pipedv1-plugin-terraform 80.26% <ø> (ø)
.-pkg-app-pipedv1-plugin-wait 35.51% <ø> (ø)
.-pkg-plugin-sdk 50.89% <ø> (ø)
.-tool-actions-gh-release 19.23% <ø> (ø)
.-tool-actions-plan-preview 25.30% <ø> (ø)
.-tool-codegen-protoc-gen-auth 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Comment on lines -50 to -51
// BuildApplicationLiveState builds the live state of the application from the given manifests.
func BuildApplicationLiveState(deploytarget string, manifests []Manifest, now time.Time) *model.ApplicationLiveState {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is an old implementation that was implemented before using the SDK.

Comment on lines -208 to -211
if model.IsApplicationConfigFile(d.Name()) {
// MEMO: can we remove this check because we have configFilename?
return nil
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Before #5987, the configFilename was an empty string, so this is needed.
But now, we can remove this if clause.

Copy link
Copy Markdown
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

Got it, this change to remove pipecd from as direct dependency of plugins 👍

@Warashi Warashi enabled auto-merge (squash) July 4, 2025 01:20
@Warashi Warashi merged commit 922941f into master Jul 4, 2025
40 checks passed
@Warashi Warashi deleted the k8s-plugin-remove-unused branch July 4, 2025 02:01
@github-actions github-actions Bot mentioned this pull request Jul 14, 2025
@github-actions github-actions Bot mentioned this pull request Aug 15, 2025
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.

3 participants