github mattrobinsonsre/terrapod v1.7.1

4 hours ago

Terrapod is a free, open-source platform replacement for Terraform Enterprise. This patch fixes five bugs reported against features that had not been exercised this way before, including one that could lose track of infrastructure.

Bug Fixes

  • A rolled-back or manually uploaded state now carries its own serial (#1702). Rolling back a state version, or uploading state by hand, stored the file under a new serial without changing the serial recorded inside it. The engine computes its next serial from the file, so a later apply could compute a serial that already existed. Its state upload was then refused with 409 after the apply had already changed infrastructure, the workspace was flagged diverged, and every following run did the same. The serial inside the stored file now matches its version, and every other byte of the state is left exactly as the engine wrote it.
  • A finishing run no longer releases a manual workspace lock (#1705). The workspace lock is the manual and CLI state lock; runs never take it. A plan-only run reaching planned, and any run that was applied, errored, discarded or canceled, still cleared whatever lock it found — so a maintenance lock could be undone by a run that finished during the window, after which apply-capable runs were no longer blocked.
  • CLI upload and log URLs use the host the caller used (#1703). A configuration version's upload-url and a plan's or apply's log-read-url were built from auth.callback_base_url, an SSO setting that defaults to http://localhost:8000. On an install without SSO, CLI configuration uploads failed to connect and remote plan logs could not be streamed. They now follow the same derivation state upload URLs already used: the forwarded host, then the Host header, then that setting as a last resort.
  • The documented module-publishing flow produces an installable module (#1707). A tarball uploaded to a version's presigned URL was never marked uploaded, so tofu init never saw the version. It is now finalized the next time the module is read — marked uploaded, its interface parsed, and runs queued on linked workspaces. Tarballs built with the documented tar -czf m.tgz -C dir . now parse correctly, and a module no longer reports setup_complete before its tarball has arrived. The registry docs now lead with the one-request upload endpoint and give the correct content type for the presigned upload.
  • Notifications say which run and who started it (#1706). Generic webhook and email notifications always sent an empty run_url and run_created_by. Both are now filled when known, and email bodies include the link and who started the run.
  • A timing-dependent test of the Vault reference-check rate limit no longer fails when its requests straddle a minute (#1716).

Upgrade notes

  • A workspace already affected by #1702 recovers with one rollback. On this release, roll back to the workspace's current state version: the copy has the same content with matching serials, and no resources change. Then run a plan and reconcile what the refused applies did. See the runbook entry Every apply's state upload is refused with 409 after a rollback.
  • A lock left behind by an interrupted CLI no longer clears itself. Before this release, any run finishing — a speculative plan, a drift check — would release a stranded lock as a side effect, as it released every other lock. Such a lock now stays until someone unlocks it, and apply-capable runs wait behind it. Unlock or force-unlock it as usual.
  • Notification payloads now include who started the run. run_created_by carries the run's creator — a user's email, or an internal source such as vcs-poller or drift-detection — to whatever endpoint the notification is configured to send to.
  • No migrations, configuration changes or breaking API changes. Every change adds to what is accepted or filled in; nothing that worked before stops working.

This release also fixes #1702 on the 1.6 line, in v1.6.5.

Status

Stable — a patch for the 1.7 line.

Full Changelog: v1.7.0...v1.7.1

Don't miss a new terrapod release

NewReleases is sending notifications on new releases.