Skip to content

fix(gcp): send a body with every POST and build GCP clients inside the runtime - #362

Open
andypalmi wants to merge 2 commits into
mainfrom
fix/gcp-post-body-and-runtime
Open

andypalmi wants to merge 2 commits into
mainfrom
fix/gcp-post-body-and-runtime

Conversation

@andypalmi

Copy link
Copy Markdown
Owner

Two live-test bugs on GCP.

  1. amicu apply on Compute Engine failed with HTTP 411. Operation waits are POST .../operations/{op}/wait with no body, and Google's front end rejects that. GcpClient::request now sends {} for any POST or PATCH without a body, so reqwest sets Content-Type and Content-Length. Every other POST in the GCP code already sent a body; the two operation waits were the only bodiless ones.

  2. amicu destroy and amicu orphans panicked with "there is no reactor running" when a Cloud Run (or Compute Engine) record was present. The refresh and orphan listing paths built a runtime but created the GCP client, whose credentials spawn a token-cache task, before entering it. They now hold rt.enter() first. The fake GCP client in tests asserts a runtime context exists, so a runtime-less construction fails the destroy, refresh and orphans tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant