GCLOUD2-25466 use PATCH instead of PUT in projects.Update#245
Merged
pedrodeoliveira merged 1 commit intomasterfrom Apr 28, 2026
Merged
GCLOUD2-25466 use PATCH instead of PUT in projects.Update#245pedrodeoliveira merged 1 commit intomasterfrom
pedrodeoliveira merged 1 commit intomasterfrom
Conversation
PUT /cloud/v1/projects/{project_id} is being retired on 2026-06-11
(GCLOUD2-23608). The endpoint accepts an identical body via PATCH, so
switch the SDK call to keep gcorelabscloud-go (and Terraform Provider
v0.x, which depends on it) working past the sunset date.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Project SDK’s projects.Update() call to use PATCH instead of PUT to stay compatible with the /cloud/v1/projects/{project_id} endpoint retirement (while keeping request/response shapes unchanged for downstream consumers like the Terraform provider).
Changes:
- Switch
gcore/project/v1/projects.Update()fromc.Puttoc.Patch. - Update
TestUpdateto assertPATCHinstead ofPUT.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
gcore/project/v1/projects/requests.go |
Changes the update request HTTP verb from PUT to PATCH while keeping the same URL, body builder, and success codes. |
gcore/project/v1/projects/testing/requests_test.go |
Aligns the unit test’s HTTP method assertion with the new PATCH behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
deferred
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PUT /cloud/v1/projects/{project_id}is retiring on 2026-06-11 (see GCLOUD2-23608). The endpoint accepts an identical body via PATCH.project/v1/projects.Update()to callc.Patchso this SDK keeps working after the sunset date — no body or signature changes.TestUpdateHTTP-method assertion.Test plan
go test ./gcore/project/v1/projects/...passesgcoreclientfrom this branch, ranproject create→project update -d→project delete. Debug output confirmsPATCH /cloud/v1/projects/<id>returning200 OK.