Skip to content

Define PlanPreviewService proto#5986

Merged
t-kikuc merged 2 commits into
masterfrom
plugin/planpreview/1-api
Jul 3, 2025
Merged

Define PlanPreviewService proto#5986
t-kikuc merged 2 commits into
masterfrom
plugin/planpreview/1-api

Conversation

@t-kikuc
Copy link
Copy Markdown
Member

@t-kikuc t-kikuc commented Jul 2, 2025

What this PR does:

as title

Note

  • The API is based on here:
    switch app.Kind {
    case model.ApplicationKind_KUBERNETES:
    dr, err = b.kubernetesDiff(ctx, app, targetDSP, preCommit, &buf)
    case model.ApplicationKind_TERRAFORM:
    dr, err = b.terraformDiff(ctx, app, targetDSP, &buf)
    case model.ApplicationKind_CLOUDRUN:
    dr, err = b.cloudrundiff(ctx, app, targetDSP, preCommit, &buf)
    case model.ApplicationKind_ECS:
    dr, err = b.ecsdiff(ctx, app, targetDSP, preCommit, &buf)
    case model.ApplicationKind_LAMBDA:
    dr, err = b.lambdadiff(ctx, app, targetDSP, preCommit, &buf)
    default:
    dr = &diffResult{
    summary: fmt.Sprintf("%s application is not implemented yet (coming soon)", app.Kind.String()),
    }
    }
  • GetPlanPreviewResponse.details is bytes for faster communication. SDK will serve a buffered writer to plugin developers.
  • Please add new fields of application to GetPlanPreviewRequest while implementing the k8s plugin. Others will only use application_id.
  • At first, we won't pass RunningDeploySource because it's better to compare TargetDeploySource and LiveState.
    • In the future, we might add RunningDeploySource to GetPlanPreviewRequest or add a new rpc.

Why we need it:

To start developing Piped-side and the SDK of PlanPreview

Which issue(s) this PR fixes:

Part of #5985

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

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
@t-kikuc t-kikuc requested a review from a team as a code owner July 2, 2025 00:54
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.16%. Comparing base (19aed96) to head (bfb485d).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5986      +/-   ##
==========================================
- Coverage   28.49%   28.16%   -0.34%     
==========================================
  Files         520      516       -4     
  Lines       56436    55933     -503     
==========================================
- Hits        16082    15754     -328     
+ Misses      39087    38925     -162     
+ Partials     1267     1254      -13     
Flag Coverage Δ
. 23.22% <ø> (-0.58%) ⬇️
.-pkg-app-pipedv1-plugin-example ?
.-pkg-app-pipedv1-plugin-kubernetes 66.42% <ø> (+0.01%) ⬆️
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 67.51% <ø> (+0.01%) ⬆️
.-pkg-app-pipedv1-plugin-wait 35.51% <ø> (ø)
.-pkg-plugin-sdk 50.89% <ø> (+2.03%) ⬆️
.-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.

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

t-kikuc commented Jul 2, 2025

For now, we'll focus on comparing with LiveState, not with RunningDeploymentSource.
If they're needed in the future, let's define a new v2 interface of the PlanPreviewService.

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 enabled auto-merge (squash) July 3, 2025 00:01
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

@t-kikuc t-kikuc merged commit 185e617 into master Jul 3, 2025
44 of 45 checks passed
@t-kikuc t-kikuc deleted the plugin/planpreview/1-api branch July 3, 2025 23:33
@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