github mattrobinsonsre/terrapod v0.23.4

4 hours ago

Fix release. Two autodiscovery bug fixes from #309 plus a small house-keeping rename.

Bug Fixes

  • Autodiscovery now backfills existing repos (#309 first half). Previously autodiscovery was purely event-driven: adding a rule to an existing monorepo did nothing until someone touched each matching directory — silently violating the contract that "autodiscovery finds your workspaces". The VCS poll cycle now runs a one-time full-tree walk against the target branch for any rule that's never been backfilled, in addition to its normal changed-files walk. Flipping enabled false → true clears the scan timestamp so re-enabling a previously-disabled rule triggers a fresh walk.
  • Trailing-slash patterns rejected at rule create / update (#309 second half). A pattern like foo/*/ compiles to a regex requiring the path to end in /. File paths never end in /, so the pattern silently matched zero files. The API now returns 422 with a hint pointing at foo/*/*.tf (one-level + tf) or foo/*/** (any depth).

Internals

  • New list_repo_tree(conn, owner, repo, ref) provider helper (GitHub: single git/trees/{ref}?recursive=1, GitLab: paginated tree walk with safety cap).
  • New nullable autodiscovery_rules.first_scan_at column tracks per-rule initial-scan completion. NULL = unscanned; non-NULL = walked at that time.
  • Rename utc_nownow_utc across 23 call sites. The old name visually collided with the deprecated stdlib datetime.utcnow() even though the wrapper always called datetime.now(UTC); no behaviour change.

Out of scope (separately tracked)

  • Dry-run preview for autodiscovery rules (#311) — previewing which workspaces would be created against a monorepo before letting a rule loose on it. Useful UX feature, no longer load-bearing now that the bug above is fixed.

Status

Beta — drop-in upgrade from v0.23.x. One additive migration (c3b957ded26c).

Full Changelog: v0.23.3...v0.23.4

Don't miss a new terrapod release

NewReleases is sending notifications on new releases.