From 211ba7cc302fb13def860d42f7cbdf32c5fba540 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 30 Jul 2025 09:52:53 +0100 Subject: [PATCH 1/3] use new packit interface --- .gitignore | 1 + scripts/run-dependencies.sh | 3 ++- scripts/run-dev-dependencies.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 95bf57b..8091202 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea .cache +.packit_identity celerybeat-schedule /*/__pycache__/ /*/*/__pycache__/ diff --git a/scripts/run-dependencies.sh b/scripts/run-dependencies.sh index 717eb98..71742d3 100755 --- a/scripts/run-dependencies.sh +++ b/scripts/run-dependencies.sh @@ -40,7 +40,8 @@ hatch env run pip3 install constellation hatch env run pip3 install packit-deploy # For some reason packit is emitting exit code 1 despite apparently succeeding. Allow this for now... set +e -hatch env run -- packit start --pull $here +hatch env run packit configure $here +hatch env run -- packit start --pull echo Packit deployed with exit code $? set -e diff --git a/scripts/run-dev-dependencies.sh b/scripts/run-dev-dependencies.sh index c257232..cf8fbcf 100755 --- a/scripts/run-dev-dependencies.sh +++ b/scripts/run-dev-dependencies.sh @@ -9,7 +9,7 @@ function cleanup() { docker container rm reverse-proxy -v # Same exit code issue for packit stop as packit start.... set +e - hatch env run -- packit stop ./scripts + hatch env run -- packit stop set -e # remove db volume manually rather than --volumes flag to packit, to avoid requiring user confirmation docker volume rm montagu_packit_db montagu_orderly_library montagu_outpack_volume montagu_orderly_logs From f14ccede4017fae0db247c2eb678feeeedaf0d43 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 30 Jul 2025 16:43:23 +0100 Subject: [PATCH 2/3] packit should have sensible exit code now --- scripts/run-dependencies.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/run-dependencies.sh b/scripts/run-dependencies.sh index 71742d3..1543e83 100755 --- a/scripts/run-dependencies.sh +++ b/scripts/run-dependencies.sh @@ -38,12 +38,8 @@ $here/montagu_cli.sh addRole test.user user # Run packit hatch env run pip3 install constellation hatch env run pip3 install packit-deploy -# For some reason packit is emitting exit code 1 despite apparently succeeding. Allow this for now... -set +e hatch env run packit configure $here hatch env run -- packit start --pull -echo Packit deployed with exit code $? -set -e docker exec montagu-packit-db wait-for-db From f529a7e7f071c8ae5e3b8911db18b73881dff4d9 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 30 Jul 2025 17:17:18 +0100 Subject: [PATCH 3/3] remove exit code ignore in cleanup too --- scripts/run-dev-dependencies.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/run-dev-dependencies.sh b/scripts/run-dev-dependencies.sh index cf8fbcf..fd079d5 100755 --- a/scripts/run-dev-dependencies.sh +++ b/scripts/run-dev-dependencies.sh @@ -7,10 +7,7 @@ set -ex function cleanup() { docker container stop reverse-proxy docker container rm reverse-proxy -v - # Same exit code issue for packit stop as packit start.... - set +e hatch env run -- packit stop - set -e # remove db volume manually rather than --volumes flag to packit, to avoid requiring user confirmation docker volume rm montagu_packit_db montagu_orderly_library montagu_outpack_volume montagu_orderly_logs docker compose --project-name montagu down -v