Skip to main content
← Back to list
01Issue
BugClosedExtensionsPublic
AssigneesNone

Relationships

#2657 Codegen/GCP: PUT update fallback from stored state silently reverts out-of-band changes

Opened by stack72 · 9/28/2026

Follow-up to swamp-club #2287 (PR 341). For full-replacement PUT updates (compute instances and firewalls, storage buckets, and others), the generated update fills each create-required body field left unset in global args from stored state, the data that list/get last wrote. Stored state can be stale: if a field was changed outside swamp since the last get/sync, update sends the old value and silently reverts the change, with no error.

The Cloudflare fix (swamp-club #2645) fills these fields from a GET of the live resource instead. The GET is skipped when global args set every such field, and update throws update requires global arguments before the PUT when the live resource lacks one. Apply the same to codegen/gcp/extensionModelGenerator.ts, add an integration test where stored state and the live resource differ, regenerate, and update codegen/designs/gcp.md.

Also in codegen/designs/gcp.md: it says swamp validates GlobalArgsSchema for every method. Method runs actually use .partial(); the full check is at swamp model create with any --global-arg and in workflow validate for type-based steps (see the correction posted on #2623).

02Bog Flow
✓OPEN○TRIAGED○IN PROGRESS◉CLOSED

Closed

9/29/2026, 11:23:37 AM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

system commented 9/28/2026, 11:09:53 PM

Classified automatically when this issue was filed.

  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

stack72 commented 9/29/2026, 11:23:36 AM

Closed out: fixed in https://git.swamp-club.com/swamp-club/swamp-extensions/pulls/349 (merged and published, tracked under the #2662 lifecycle). GCP full-replacement PUT updates now fill unset fields from a GET of the live resource instead of stored state, so changes made outside swamp are no longer reverted. Fingerprint and etag also come from that read. A PUT that takes an updateMask is treated as a partial update. codegen/designs/gcp.md documents this and corrects the GlobalArgsSchema note: method runs use .partial(), and the full check runs at swamp model create with --global-arg and in workflow validate for type-based steps.

Sign in to post a ripple.