Skip to content

Handle unimplemented Cloud Run v1 plugin handlers gracefully#6986

Open
rootp1 wants to merge 2 commits into
pipe-cd:masterfrom
rootp1:fix/cloudrun-plugin-no-panics
Open

Handle unimplemented Cloud Run v1 plugin handlers gracefully#6986
rootp1 wants to merge 2 commits into
pipe-cd:masterfrom
rootp1:fix/cloudrun-plugin-no-panics

Conversation

@rootp1

@rootp1 rootp1 commented Jul 7, 2026

Copy link
Copy Markdown

What this PR does:

Prevents the piped v1 Cloud Run plugin from panicking in its unimplemented deployment and livestate entry points by returning explicit errors instead, and adds regression tests for each handler.

Why we need it:

The plugin binary currently registers Cloud Run deployment and livestate handlers that still call panic("implement me"), which can crash the plugin process when those exported methods are invoked.

Which issue(s) this PR fixes:

Fixes #6985

Does this PR introduce a user-facing change?:

  • How are users affected by this change: Cloud Run v1 plugin calls now fail gracefully with explicit errors instead of terminating the plugin process.
  • Is this breaking change: no
  • How to migrate (if breaking change): Not applicable

Summary

  • replace Cloud Run v1 panic("implement me") stubs with explicit returned errors
  • add regression tests for deployment and livestate handlers that previously panicked

Linked Issue

Fixes #6985

What Changed

  • deployment.Plugin.ExecuteStage, DetermineVersions, and DetermineStrategy now return explicit errors
  • livestate.Plugin.GetLivestate now returns an explicit error
  • added focused tests covering all previously panicking entry points

Verification

  • go test ./... (in pkg/app/pipedv1/plugin/cloudrun) — passed
  • go test -race ./... (in pkg/app/pipedv1/plugin/cloudrun) — passed
  • make build/go — passed
  • make build/plugin PLUGINS=cloudrun — passed
  • ./hack/ensure-dco.sh — passed
  • make check — not run successfully: failed in the required build/web step because this environment does not have yarn; later required lint/go and gen/code steps also require docker, which is unavailable here

Scope

  • only Cloud Run v1 plugin implementation files and focused tests were changed; unrelated files were not modified

Signed-off-by: rootp1 <arnav.iitr@gmail.com>
@rootp1

rootp1 commented Jul 7, 2026

Copy link
Copy Markdown
Author

@ffjlabo @khanhtc1202 @Warashi Please have a look, whenever you have a chance to

@armistcxy

Copy link
Copy Markdown
Contributor

AFAIK, Google Cloud Run Plugin has been planned to be developed in near future (maybe in GSoC or LFX Mentorship) , not now

@rootp1

rootp1 commented Jul 8, 2026

Copy link
Copy Markdown
Author

AFAIK, Google Cloud Run Plugin has been planned to be developed in near future (maybe in GSoC or LFX Mentorship) , not now

Hi, @armistcxy
Thanks for the clarification!
Could you please share a bit more insight into what the Google Cloud Run plugin might look like? Also, is there any chance it will be included in the upcoming LFX fall term, or any other ideas?

@rahulshendre

Copy link
Copy Markdown
Contributor

Also, is there any chance it will be included in the upcoming LFX fall term, or any other ideas?

@khanhtc1202, we are planning to having it for Term 3 right 👀

@rahulshendre

Copy link
Copy Markdown
Contributor

for ref - #6114

@rootp1

rootp1 commented Jul 8, 2026

Copy link
Copy Markdown
Author

Thanks for the context and for linking #6114. My intent with this PR was only to remove the current panic path in the unimplemented Cloud Run v1 handlers, not to define the Cloud Run plugin itself. If you would prefer to keep all Cloud Run-related changes under #6114 / the planned Term 3 work, I am fine to close this PR. If a small defensive fix is still useful before then, I can also re-scope the change accordingly.

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.

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

3 participants