Skip to content

[K8s plugin] Add helper function to delete all variant resources#5903

Merged
Warashi merged 9 commits into
masterfrom
k8s-plugin-remove-variant-resources
Jun 3, 2025
Merged

[K8s plugin] Add helper function to delete all variant resources#5903
Warashi merged 9 commits into
masterfrom
k8s-plugin-remove-variant-resources

Conversation

@Warashi
Copy link
Copy Markdown
Member

@Warashi Warashi commented May 30, 2025

What this PR does:

as title

Why we need it:

I want to use this in the K8S_BASELINE_CLEAN stage, which deletes previously deployed baseline variant resources.

Which issue(s) this PR fixes:

Part of #5764

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

Warashi added 5 commits May 29, 2025 16:48
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
…ariant-resources

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>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 30.95238% with 29 lines in your changes missing coverage. Please review.

Project coverage is 27.91%. Comparing base (29e3ccf) to head (8fa4c62).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...g/app/pipedv1/plugin/kubernetes/deployment/misc.go 0.00% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5903      +/-   ##
==========================================
- Coverage   27.93%   27.91%   -0.03%     
==========================================
  Files         516      519       +3     
  Lines       55450    55987     +537     
==========================================
+ Hits        15492    15630     +138     
- Misses      38767    39157     +390     
- Partials     1191     1200       +9     
Flag Coverage Δ
. 23.74% <ø> (-0.01%) ⬇️
.-pkg-app-pipedv1-plugin-example 0.00% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes 62.78% <30.95%> (-0.54%) ⬇️
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 64.93% <ø> (ø)
.-pkg-app-pipedv1-plugin-wait 35.51% <ø> (ø)
.-pkg-plugin-sdk 49.33% <ø> (+0.08%) ⬆️
.-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.

Warashi added 2 commits May 30, 2025 13:46
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
@Warashi Warashi marked this pull request as ready for review June 2, 2025 09:14
@Warashi Warashi requested a review from a team as a code owner June 2, 2025 09:14
Copy link
Copy Markdown
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

just added comments for test

}
}

func TestManifest_IsService(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: add t.Parallel

}
}

func TestManifest_IsWorkload(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: add t.Parallel

}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: add t.Parallel

}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: add t.Parallel

Warashi added 2 commits June 3, 2025 10:23
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
@Warashi
Copy link
Copy Markdown
Member Author

Warashi commented Jun 3, 2025

@ffjlabo
Thank you.
I added t.Parallel on the commented line at 4b3eee8
Additionally, I added t.Parallel on all the tests in manifest_test.go at 4b3eee8

@Warashi Warashi requested a review from ffjlabo June 3, 2025 01:27
Copy link
Copy Markdown
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

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

Let's try!

@Warashi Warashi merged commit 1ac2006 into master Jun 3, 2025
39 of 40 checks passed
@Warashi Warashi deleted the k8s-plugin-remove-variant-resources branch June 3, 2025 05:26
@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