From 647768b55d939c04b0556e2a5e38113f4d7609db Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Tue, 20 Jan 2026 22:39:17 +0300 Subject: [PATCH] fix: Update model version check to only verify US versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The UK package (policyengine-uk) does not support the older Python versions that API v1 runs on, so the UK version deployed to Modal may not match the version pinned in API v1's requirements. This change: - Removes UK version checking from the script - Adds explanatory comments about why UK is not checked - Keeps backwards compatibility by accepting but ignoring -uk flag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/request-simulation-model-versions.sh | 33 ++++++++------------ changelog_entry.yaml | 4 +++ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/request-simulation-model-versions.sh b/.github/request-simulation-model-versions.sh index 0da4706cf..b37a8727c 100755 --- a/.github/request-simulation-model-versions.sh +++ b/.github/request-simulation-model-versions.sh @@ -3,24 +3,27 @@ set -e # Modal Gateway version check script -# Verifies that the US and UK package versions used by API v1 are deployed +# Verifies that the US package version used by API v1 is deployed # in the Modal simulation API before allowing API v1 deployment to proceed. # -# Usage: ./request-simulation-model-versions.sh -us -uk +# NOTE: We explicitly do NOT check for UK versions here. The UK package +# (policyengine-uk) does not support the older Python versions that API v1 +# runs on, so the UK version deployed to Modal may not match the version +# pinned in API v1's requirements. +# +# Usage: ./request-simulation-model-versions.sh -us GATEWAY_URL="https://policyengine--policyengine-simulation-gateway-web-app.modal.run" usage() { - echo "Usage: $0 -us -uk " + echo "Usage: $0 -us " echo "" echo "Required flags:" echo " -us us_version - US package version (e.g., 1.459.0)" - echo " -uk uk_version - UK package version (e.g., 2.65.9)" exit 1 } US_VERSION="" -UK_VERSION="" while [ $# -gt 0 ]; do case "$1" in @@ -29,7 +32,8 @@ while [ $# -gt 0 ]; do shift 2 ;; -uk) - UK_VERSION="$2" + # Accept but ignore UK version flag for backwards compatibility + echo "Note: UK version check is disabled (see script comments)" shift 2 ;; -h|--help) @@ -42,15 +46,14 @@ while [ $# -gt 0 ]; do esac done -if [ -z "$US_VERSION" ] || [ -z "$UK_VERSION" ]; then - echo "Error: Both -us and -uk versions are required" +if [ -z "$US_VERSION" ]; then + echo "Error: -us version is required" usage fi echo "Checking Modal simulation API versions..." echo " Gateway: $GATEWAY_URL" echo " Expected US version: $US_VERSION" -echo " Expected UK version: $UK_VERSION" echo "" # Query the gateway for deployed versions @@ -71,16 +74,6 @@ if [ -z "$US_DEPLOYED" ]; then fi echo "US version $US_VERSION is deployed (app: $US_DEPLOYED)" -# Check if UK version is deployed -UK_DEPLOYED=$(echo "$VERSIONS_RESPONSE" | jq -r --arg v "$UK_VERSION" '.uk[$v] // empty') -if [ -z "$UK_DEPLOYED" ]; then - echo "ERROR: UK version $UK_VERSION is NOT deployed in Modal simulation API" - echo "Available UK versions:" - echo "$VERSIONS_RESPONSE" | jq -r '.uk | keys[]' - exit 1 -fi -echo "UK version $UK_VERSION is deployed (app: $UK_DEPLOYED)" - echo "" -echo "SUCCESS: Both US and UK versions are deployed and ready" +echo "SUCCESS: US version is deployed and ready" exit 0 diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..53077e92f 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + changed: + - Updated model version alignment check to use Modal gateway instead of GCP and only verify US versions.