Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid insertion key dupls in
module_configuration
table by ups…
…erting on conflict (#2107) Fixes #2084 This PR addresses the config side, whereas #2105 fixed it for secrets. I confirmed the test fails before this change but passes with it: ``` $ go test ./common/configuration/dal/... -run TestModuleConfiguration debug:migrate: Applying: 20231103205514_init.sql debug:migrate: Applied: 20231103205514_init.sql in 134.088875ms debug:migrate: Applying: 20240704103403_create_module_secrets.sql debug:migrate: Applied: 20240704103403_create_module_secrets.sql in 5.793958ms --- FAIL: TestModuleConfiguration (0.30s) --- FAIL: TestModuleConfiguration/HandlesConflicts (0.00s) dal_test.go:108: Did not expect an error but got: duplicate key value violates unique constraint "module_configuration_module_name_key": conflict FAIL FAIL github.com/TBD54566975/ftl/common/configuration/dal 0.760s FAIL $ go test ./common/configuration/dal/... -run TestModuleConfiguration ok github.com/TBD54566975/ftl/common/configuration/dal 0.775s ```
- Loading branch information