Skip to content

[K8s Plugin] Add helper function to add variant label and annotation #5857

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

Merged
merged 4 commits into from
May 22, 2025

Conversation

Warashi
Copy link
Member

@Warashi Warashi commented May 21, 2025

What this PR does:

as title

Why we need it:

to simplify codes

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 Warashi marked this pull request as ready for review May 21, 2025 01:44
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.77%. Comparing base (7d4722f) to head (c98d2af).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5857      +/-   ##
==========================================
- Coverage   27.79%   27.77%   -0.02%     
==========================================
  Files         510      510              
  Lines       54329    54316      -13     
==========================================
- Hits        15101    15088      -13     
  Misses      38082    38082              
  Partials     1146     1146              

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

Copy link
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.

Almost LGTM


for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
manifests, err := provider.ParseManifests(tc.inputYAML)
Copy link
Member

Choose a reason for hiding this comment

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

add t.Parallel()? (I'm not confident😅)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, thank you. I'll add it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.
c98d2af

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
@Warashi Warashi requested a review from t-kikuc May 21, 2025 04:45
Copy link
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

@Warashi Warashi enabled auto-merge (squash) May 22, 2025 01:33
@Warashi Warashi merged commit 1df0c34 into master May 22, 2025
20 checks passed
@Warashi Warashi deleted the k8s-plugin-refactor-add-variant-labels-annotations branch May 22, 2025 02:17
aryasoni98 pushed a commit to aryasoni98/pipecd that referenced this pull request May 24, 2025
…ipe-cd#5857)

* Add a function to add variant labels and annotations to the given manifests.

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Use a helper function to add variant labels and annotations to all manifests.

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Define and use addVariantLabelsAndAnnotations function in k8s_multicluster plugin

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Add t.Parallel() to test cases.

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

---------

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Arya Soni <[email protected]>
@github-actions github-actions bot mentioned this pull request May 28, 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