Fix conditional simulation entrypoint deployment configuration - #3780
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3780 +/- ##
=======================================
Coverage 80.71% 80.71%
=======================================
Files 74 74
Lines 4422 4422
Branches 822 822
=======================================
Hits 3569 3569
Misses 623 623
Partials 230 230 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
anth-volk
marked this pull request as ready for review
July 30, 2026 00:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3779
What changed
SIM_ENTRYPOINTvariables scoped separately to the existingstagingandproductionGitHub Environments as the routing selector.old_gateway_directand remove.github/simulation-entrypoint-mode.OLD_SIMULATION_GATEWAY_URLrepository variable.SIMULATION_ENTRYPOINT_URLsecrets scoped separately to the existingstagingandproductionGitHub Environments.SIMULATION_API_URLsecret.Why
The first deployment after #3776 required both the existing Modal gateway URL and the future Cloud Run Entrypoint URL. That sequencing was incorrect: API v1 must first deploy safely in direct-Modal mode, before the Cloud Run Entrypoint URL is established, verified, and stored.
The root cause was unconditional routing configuration rather than a selected-upstream contract shared by all deployment consumers. Routing configuration now belongs to the existing protected deployment Environments and becomes runtime environment variables only inside corresponding jobs and deployed revisions.
Impact
The corrective release can deploy through staging and production while API v1 continues calling Modal directly.
SIM_ENTRYPOINTis currentlyold_gateway_directin both GitHub Environments, and bothSIMULATION_ENTRYPOINT_URLEnvironment secrets remain intentionally unset. After the Entrypoint URL is established and verified, its value can be added separately to both Environment secrets; changing both selectors tocloud_run_simulation_entrypointthen activates the new path for the next qualified release.Validation
66 passedintests/unit/test_cloud_run_deploy_scripts.py132 passedin the earlier focused selector and deployment suite195 passedacross simulation client, gateway contract, economy service, and budget-window compatibility coveragegit diff --check