Piped v1 Cloud Run plugin panics on deployment and livestate entry points

未关闭
#6,985 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

  • #6986 来自 @rootp1 —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
go
领域
cloud, devops

调研方向

从 pkg/app/pipedv1/plugin/cloudrun/deployment/plugin.go 和 pkg/app/pipedv1/plugin/cloudrun/livestate/plugin.go 开始,然后检查 pkg/app/pipedv1/plugin/cloudrun/main.go 中的注册。通过针对性的单元测试执行 ExecuteStage、DetermineVersions、DetermineStrategy 和 GetLivestate。当这些入口点不再 panic、不支持的操作返回明确的错误,并且回归测试覆盖每个 handler 时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

What happened:

The piped v1 Cloud Run plugin exposes deployment and livestate entry points that still call panic("implement me"). Any request that reaches ExecuteStage, DetermineVersions, DetermineStrategy, or GetLivestate will crash the plugin process instead of returning a controlled error.

What you expected to happen:

Cloud Run plugin requests should either complete successfully or return an explicit error without panicking the process.

How to reproduce it:

  1. Open pkg/app/pipedv1/plugin/cloudrun/deployment/plugin.go and pkg/app/pipedv1/plugin/cloudrun/livestate/plugin.go.
  2. Inspect Plugin.ExecuteStage, Plugin.DetermineVersions, Plugin.DetermineStrategy, and Plugin.GetLivestate.
  3. Invoke any of those exported methods from a focused unit test or a small harness.
  4. Observe that the current implementation panics immediately because each method ends in panic("implement me").

Environment:

  • piped version: repository checkout on 2026-07-07
  • control-plane version: repository checkout on 2026-07-07
  • Others: reproduced from current master checkout by static inspection of the exported Cloud Run plugin handlers

Summary

The v1 Cloud Run plugin binary is registered with both deployment and livestate handlers, but several required methods are still stubbed with panics.

Affected Area

pkg/app/pipedv1/plugin/cloudrun

Steps to Reproduce

  1. Build or inspect the Cloud Run v1 plugin module.
  2. Call ExecuteStage, DetermineVersions, or DetermineStrategy on deployment.Plugin.
  3. Call GetLivestate on livestate.Plugin.
  4. Observe process termination from panic("implement me") instead of an error response.

Expected Behaviour

Cloud Run plugin handlers should never crash the plugin process. Unsupported behavior should be reported through explicit errors until full implementations exist.

Actual Behaviour

The exported handlers panic immediately, which can terminate the plugin process when those code paths are exercised.

Technical Evidence

  • pkg/app/pipedv1/plugin/cloudrun/deployment/plugin.go:51-63
  • pkg/app/pipedv1/plugin/cloudrun/livestate/plugin.go:27-29
  • pkg/app/pipedv1/plugin/cloudrun/main.go registers both deployment and livestate plugins through sdk.NewPlugin(...), so these panic paths are part of the published plugin surface.

Suspected Root Cause

The Cloud Run v1 plugin skeleton was merged before deployment and livestate handler implementations were completed.

Proposed Direction

Replace the panic stubs with explicit returned errors for unsupported operations, or gate registration of unfinished handlers until complete implementations are ready. Add regression tests covering each handler so future changes cannot reintroduce process panics.

Acceptance Criteria

  • Cloud Run plugin deployment and livestate entry points no longer panic.
  • Unsupported operations return explicit errors instead.
  • Focused unit tests cover ExecuteStage, DetermineVersions, DetermineStrategy, and GetLivestate.
主要语言
Go
星标
1.4k
派生
391
平均合并
4 天 1 小时
30 天内合并 PR
58

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pipe-cd/pipecd 的其他 Issue

查看 pipe-cd/pipecd 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。