Skip to content

Commit a6d942a

Browse files
authored
Merge pull request #3107 from PolicyEngine/chore/remove-deprecated-gcp-code
Fixes #3106: Update model version check to only verify US versions
2 parents 333da60 + 647768b commit a6d942a

2 files changed

Lines changed: 17 additions & 20 deletions

File tree

.github/request-simulation-model-versions.sh

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@
33
set -e
44

55
# Modal Gateway version check script
6-
# Verifies that the US and UK package versions used by API v1 are deployed
6+
# Verifies that the US package version used by API v1 is deployed
77
# in the Modal simulation API before allowing API v1 deployment to proceed.
88
#
9-
# Usage: ./request-simulation-model-versions.sh -us <us_version> -uk <uk_version>
9+
# NOTE: We explicitly do NOT check for UK versions here. The UK package
10+
# (policyengine-uk) does not support the older Python versions that API v1
11+
# runs on, so the UK version deployed to Modal may not match the version
12+
# pinned in API v1's requirements.
13+
#
14+
# Usage: ./request-simulation-model-versions.sh -us <us_version>
1015

1116
GATEWAY_URL="https://policyengine--policyengine-simulation-gateway-web-app.modal.run"
1217

1318
usage() {
14-
echo "Usage: $0 -us <us_version> -uk <uk_version>"
19+
echo "Usage: $0 -us <us_version>"
1520
echo ""
1621
echo "Required flags:"
1722
echo " -us us_version - US package version (e.g., 1.459.0)"
18-
echo " -uk uk_version - UK package version (e.g., 2.65.9)"
1923
exit 1
2024
}
2125

2226
US_VERSION=""
23-
UK_VERSION=""
2427

2528
while [ $# -gt 0 ]; do
2629
case "$1" in
@@ -29,7 +32,8 @@ while [ $# -gt 0 ]; do
2932
shift 2
3033
;;
3134
-uk)
32-
UK_VERSION="$2"
35+
# Accept but ignore UK version flag for backwards compatibility
36+
echo "Note: UK version check is disabled (see script comments)"
3337
shift 2
3438
;;
3539
-h|--help)
@@ -42,15 +46,14 @@ while [ $# -gt 0 ]; do
4246
esac
4347
done
4448

45-
if [ -z "$US_VERSION" ] || [ -z "$UK_VERSION" ]; then
46-
echo "Error: Both -us and -uk versions are required"
49+
if [ -z "$US_VERSION" ]; then
50+
echo "Error: -us version is required"
4751
usage
4852
fi
4953

5054
echo "Checking Modal simulation API versions..."
5155
echo " Gateway: $GATEWAY_URL"
5256
echo " Expected US version: $US_VERSION"
53-
echo " Expected UK version: $UK_VERSION"
5457
echo ""
5558

5659
# Query the gateway for deployed versions
@@ -71,16 +74,6 @@ if [ -z "$US_DEPLOYED" ]; then
7174
fi
7275
echo "US version $US_VERSION is deployed (app: $US_DEPLOYED)"
7376

74-
# Check if UK version is deployed
75-
UK_DEPLOYED=$(echo "$VERSIONS_RESPONSE" | jq -r --arg v "$UK_VERSION" '.uk[$v] // empty')
76-
if [ -z "$UK_DEPLOYED" ]; then
77-
echo "ERROR: UK version $UK_VERSION is NOT deployed in Modal simulation API"
78-
echo "Available UK versions:"
79-
echo "$VERSIONS_RESPONSE" | jq -r '.uk | keys[]'
80-
exit 1
81-
fi
82-
echo "UK version $UK_VERSION is deployed (app: $UK_DEPLOYED)"
83-
8477
echo ""
85-
echo "SUCCESS: Both US and UK versions are deployed and ready"
78+
echo "SUCCESS: US version is deployed and ready"
8679
exit 0

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
changed:
4+
- Updated model version alignment check to use Modal gateway instead of GCP and only verify US versions.

0 commit comments

Comments
 (0)