mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 16:04:50 +03:00
fix(database): guard inbound migrations against active PostgreSQL writes
Acquire non-blocking database locks before inbound migration. Keep migration passes atomic and return errors to the CLI and import callers.
This commit is contained in:
@@ -194,6 +194,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL inbound migration contention
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^TestMigrationRequirementsRejectsLiveNodeMergePostgres$' -count=1 -v | tee /tmp/postgres-inbound-migration.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-inbound-migration.log || true)
|
||||
if [ "$passed" -ne 1 ]; then
|
||||
echo "expected the PostgreSQL inbound migration contention test to pass, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL node snapshot regressions
|
||||
run: |
|
||||
set -o pipefail
|
||||
|
||||
Reference in New Issue
Block a user