garm/database/sql
Gabriel Adrian Samfira c7d34e0f0e Force transition instances in inconsistent state
If GARM is killed or restarted while creating a runner, there is a chance
that runners remain in creating or deleting state. We've started checking
state transitions in GARM and allow a transition when the new state makes
sense in normal circumstances. However, when recovering from a crash, we
may be in an inconsisten state from which we need to recover.

This change added a ForceUpdateInstance() function that ignores state
transition inconsistencies. For now, we only use it when spinning up a
scale set and check for instance states.

This change also fixes a locking issue.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2026-02-11 20:51:32 +02:00
..
common_test.go Add copyright header 2025-05-20 09:43:29 +00:00
controller.go Handle garm-agent tools upload/sync 2026-02-08 00:27:47 +02:00
controller_test.go Fix database tests 2025-10-07 21:01:40 +03:00
enterprise.go Add agent mode 2026-02-08 00:27:47 +02:00
enterprise_test.go Add agent mode 2026-02-08 00:27:47 +02:00
file_store.go Add agent mode 2026-02-08 00:27:47 +02:00
file_store_test.go Add API, CLI and web UI integration for objects 2025-10-08 22:22:58 +03:00
gitea.go Add the ability to set tools download source (Gitea) 2025-09-26 18:59:15 +03:00
gitea_test.go Add agent mode 2026-02-08 00:27:47 +02:00
github.go Switch to fmt.Errorf 2025-08-16 22:19:05 +00:00
github_test.go Add agent mode 2026-02-08 00:27:47 +02:00
instances.go Force transition instances in inconsistent state 2026-02-11 20:51:32 +02:00
instances_test.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00
jobs.go Delete all inactionable jobs 2026-02-10 14:41:15 +02:00
jobs_test.go Delete all inactionable jobs 2026-02-10 14:41:15 +02:00
models.go Delete all inactionable jobs 2026-02-10 14:41:15 +02:00
organizations.go Add agent mode 2026-02-08 00:27:47 +02:00
organizations_test.go Add agent mode 2026-02-08 00:27:47 +02:00
pools.go Add agent mode 2026-02-08 00:27:47 +02:00
pools_test.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00
repositories.go Add agent mode 2026-02-08 00:27:47 +02:00
repositories_test.go Add agent mode 2026-02-08 00:27:47 +02:00
scaleset_instances.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00
scalesets.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00
scalesets_test.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00
sql.go Add agent mode 2026-02-08 00:27:47 +02:00
templates.go Add agent mode 2026-02-08 00:27:47 +02:00
templates_test.go Fix tests 2026-02-08 00:27:47 +02:00
users.go Switch to fmt.Errorf 2025-08-16 22:19:05 +00:00
users_test.go Switch to fmt.Errorf 2025-08-16 22:19:05 +00:00
util.go Add runner rotate ability to CLI 2026-02-09 00:30:57 +02:00