Skip to content

chore(garm): bump workload to fix startup on upgraded postgresql databases - #429

Merged
cbartz merged 1 commit into
mainfrom
fix/garm-postgres-forge-instance-column-types
Oct 15, 2026
Merged

cbartz merged 1 commit into
mainfrom
fix/garm-postgres-forge-instance-column-types

Conversation

@cbartz

@cbartz cbartz commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Bumps the pinned GARM workload commit to the merge of cloudbase/garm#922.

Why we need it

Upgrading GARM to the previous pin (93377e7f) failed on our production PostgreSQL database. The startup migration 0008 errored with operator does not exist: text = uuid, and GARM didn't start, so we rolled back. PostgreSQL databases that went through GARM's migration 0003 have text instead of uuid forge_instance_id columns (cloudbase/garm#920). #922 adds a migration that converts them before 0008 runs.

Checklist

  • Changes comply with the project's coding standards and guidelines (see CONTRIBUTING.md and STYLE.md)
  • CONTRIBUTING.md has been updated upon changes to the contribution/development process (e.g. changes to the way tests are run)
  • Technical author has been assigned to review the PR in case of documentation changes (usually *.md files)
  • I updated docs/changelog.md with user-relevant changes
  • I used AI to assist with preparing this PR
  • I added or updated tests as needed (unit and integration)
  • If integration test modules are used: I updated the workflow configuration
    (e.g., in .github/workflows/integration_tests.yaml, ensure the modules list is correct)
  • If this PR involves a Grafana dashboard: I added a screenshot of the dashboard
  • If this PR involves Terraform: terraform fmt passes and tflint reports no errors
  • If this PR involves Rockcraft: I updated the version
  • If this PR adds/removes a charm, or changes a charm's base class, conventions, tooling, or repo structure: I updated the relevant AGENTS.md
  • If this PR changes .copilot-collections.yaml or .github/instructions/: I re-checked whether the AGENTS.md "12-factor divergences" guidance still matches the upstream copilot-collections guidance

Not applicable or not ticked:

  • No new test here. The failure needs a database created by a GARM version older than migration 0003, which the integration suite's fresh deployment can't produce. Upstream #922 covers it with PostgreSQL migration tests.
  • The rock version stays 0.2; it isn't bumped per workload pin (see fix(garm): bump pinned commit to fix scale set pool ID tag length #351).
  • CONTRIBUTING.md, Grafana, Terraform, AGENTS.md and copilot-collections are untouched.

Test plan

  • Reconstructed the production upgrade path on a local PostgreSQL 16:
    • Created a database with GARM from just before migration 0003, upgraded it with the old pin 840558b5, and added rows with both live and orphaned forge instance references.
    • 93377e7f failed on it with the production error.
    • ae281e37 (this pin) migrated it through 0011: columns converted to uuid, foreign keys created, live references kept, orphans resolved.
  • Built cmd/garm statically at the new pin with the rock's build tags and the Go 1.26 snap.
  • CI integration run (garm) on the rebuilt rock.

Review focus

  • The pin also brings in other upstream changes, including migrations 0010 (scale set jobs move to their own table) and 0011 (pool attribution on jobs). Both ran cleanly in the reconstruction above.
  • The generated GARM client and generate_client.sh stay where they were. The only existing endpoint whose shape changed is the jobs list, which is now paginated. The charm doesn't use it; everything else in the swagger diff is new endpoints.

AI-generated message.

…bases

Pin GARM to the merge of cloudbase/garm#922. PostgreSQL databases that
went through GARM's migration 0003 have text forge_instance_id columns,
so migration 0008 failed with "operator does not exist: text = uuid" and
GARM did not start (cloudbase/garm#920). The new migration 0007a
converts those columns before 0008 runs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The workload bump includes additional database migrations that warrant human review of production upgrade and rollback safety.

0 open findings

What changed in this PR

Updates the pinned GARM workload to restore startup on older PostgreSQL databases affected by incompatible forge instance column types.

Changes:

  • Pins GARM to ae281e37, which includes the upstream migration repair.
  • Documents the startup fix in the changelog.
File Description
garm-rockcraft.yaml Updates the workload commit and explains the migration fix.
docs/​changelog.md Records restored startup for affected PostgreSQL databases.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cbartz
cbartz marked this pull request as ready for review October 15, 2026 09:13
@cbartz
cbartz merged commit cfba7fc into main Oct 15, 2026
60 checks passed
@cbartz
cbartz deleted the fix/garm-postgres-forge-instance-column-types branch October 15, 2026 09:52
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.

5 participants