Skip to content

[Stage Plugins] Make the UI compatible with skip and approval of pipedv1 #5968

Merged
t-kikuc merged 6 commits into
masterfrom
plugin/command/server-and-ui
Jul 2, 2025
Merged

[Stage Plugins] Make the UI compatible with skip and approval of pipedv1 #5968
t-kikuc merged 6 commits into
masterfrom
plugin/command/server-and-ui

Conversation

@t-kikuc
Copy link
Copy Markdown
Member

@t-kikuc t-kikuc commented Jun 24, 2025

What this PR does:

  • UI: Judge by availableOperation to show the skip/approval button
  • server: Add availableOperation to pipedv0 Analysis/WaitApproval stages

Note:

  • We need to pass metadata of Approvers, ApprovedBy, and SkippedBy from WaitApproval/Analysis stage.
    • we need refactoring of the const values

Why we need it:

To enable skip/approval of both pipedv0 and pipedv1

Which issue(s) this PR fixes:

Part of #5367

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

t-kikuc added 2 commits June 24, 2025 20:14
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@t-kikuc t-kikuc requested review from a team as code owners June 24, 2025 13:07
@t-kikuc t-kikuc marked this pull request as draft June 24, 2025 13:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Project coverage is 28.16%. Comparing base (c0e822f) to head (d1b510a).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
pkg/datastore/deploymentstore.go 14.28% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5968   +/-   ##
=======================================
  Coverage   28.15%   28.16%           
=======================================
  Files         518      516    -2     
  Lines       55910    55924   +14     
=======================================
+ Hits        15744    15752    +8     
- Misses      38914    38919    +5     
- Partials     1252     1253    +1     
Flag Coverage Δ
. 23.22% <14.28%> (+<0.01%) ⬆️
.-pkg-app-pipedv1-plugin-example ?
.-pkg-app-pipedv1-plugin-kubernetes 66.42% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 67.51% <ø> (ø)
.-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.

t-kikuc added 2 commits June 25, 2025 00:35
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@t-kikuc t-kikuc marked this pull request as ready for review June 30, 2025 07:24
@t-kikuc t-kikuc changed the title Make the UI compatible with skip and approval of pipedv1 [Stage Plugins] Make the UI compatible with skip and approval of pipedv1 Jul 1, 2025
@t-kikuc t-kikuc enabled auto-merge (squash) July 1, 2025 01:58
Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
khanhtc1202
khanhtc1202 previously approved these changes Jul 1, 2025
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.

👌

Comment on lines +247 to +248
{stage.availableOperation ===
ManualOperation.MANUAL_OPERATION_APPROVE &&
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.

We have to support the old Deployment created by pipedv0 and the old control plane. It may lack the availableOperation field.
How about leaving detection based on the stage name for a while, and removing it after the end of support of pipedv0?

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.

@Warashi
Thank you. I fixed.

d1b510a

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.

I linked this PR to #5542 to prevent forgetting to remove the condition.

Comment on lines +150 to +151
{activeStage.availableOperation ===
ManualOperation.MANUAL_OPERATION_SKIP &&
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.

Same as comment on web/src/components/deployments-detail-page/pipeline/index.tsx

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Copy link
Copy Markdown
Member

@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

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

@t-kikuc t-kikuc merged commit 910f52e into master Jul 2, 2025
37 of 38 checks passed
@t-kikuc t-kikuc deleted the plugin/command/server-and-ui branch July 2, 2025 06:57
@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.

4 participants