Skip to content

Add modal environments based on PROJECT#2630

Merged
grzegorz-roboflow merged 5 commits into
mainfrom
feat/modal-executor-staging
Jul 9, 2026
Merged

Add modal environments based on PROJECT#2630
grzegorz-roboflow merged 5 commits into
mainfrom
feat/modal-executor-staging

Conversation

@grzegorz-roboflow

Copy link
Copy Markdown
Collaborator

What does this PR do?

Add modal environments based on PROJECT so it's possible to test changes made to modal executor on staging

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

Tested in personal modal account

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely.

🚦 This PR is marked Ready for review, so automated Claude review will run — and every pass spends real credits.

Warning

💸 The Claude reviewer bills in credits, not vibes

Automated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared.

Draft when unsure, Ready when you mean it:

  • 🌱 Not sure the PR is in good shape yet? Keep it (or set it back) as a draft — drafts pause review, so you can push and iterate without burning credits on a moving target.
  • 💪 Feel strong about the contents? Mark it Ready for review and the reviewer will take a look.

However you get there, arrive prepared:

  • 🧱 Bring a SOLID, thorough PR. Point your local agent at our skills/ to tune it to our guidelines first — or, if you are one of those fabled carbon-based contributors, read them yourself. A half-baked diff costs exactly the same to review as a finished one.
  • Resolve every comment before you re-request review. Re-requesting with threads still open means paying twice for the same conversation.
  • 🔁 Do not use CI review as an inner loop for a local agent. The reviewer is not a step-by-step debugger — do the unfolding locally and arrive with the answer, not the search.
  • 🙋 If something looks off, ask a human. One question to a maintainer is cheaper and faster than three rounds of agent re-review chasing a misread.

Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.

  • Prefer to skip automated review entirely? Add the skip-claude-review label.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude review started at commit 9ea6edf09387171cd426d0e9e9457500395c0b17.

New commits are not auto-reviewed. Add the claude-review label (remove & re-add it to trigger again) when you want another review.

Comment thread inference/core/env.py Outdated
Comment on lines +761 to +763
WEBEXEC_MODAL_APP_NAME = os.getenv(
"WEBEXEC_MODAL_APP_NAME", f"webexec-{PROJECT}"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Production default changes from webexec to webexec-roboflow-platform. Before this PR the Modal app name was hardcoded to "webexec" in all three places (modal_app.py app definition, deploy_modal_app.py lookup, and the endpoint-URL reconstruction in modal_executor.py). With PROJECT defaulting to roboflow-platform, this new var makes the production default webexec-roboflow-platform unless WEBEXEC_MODAL_APP_NAME is explicitly set.

Consequences to confirm before merge:

  • The already-deployed production Modal app (presumably named webexec) must be re-deployed under the new name, or the app must have WEBEXEC_MODAL_APP_NAME=webexec pinned, otherwise the executor and the live deployment diverge.
  • When MODAL_WEB_ENDPOINT_URL is not set in prod, modal_executor._get_endpoint_url reconstructs https://roboflow--webexec-roboflow-platform-executor-execute-block.modal.run. That URL 404s until the app is redeployed with the new name → Custom Python Block execution via Modal fails when WORKFLOWS_CUSTOM_PYTHON_EXECUTION_MODE=modal.
  • When MODAL_WEB_ENDPOINT_URL is set in prod, the deploy/modal_app side switches to the new app name while the executor keeps hitting the old override URL — deploy and runtime then point at different apps.

Per the core-infra convention, a default that changes production routing should be justified and pinned in the relevant environment. Please confirm the rollout coordination (see the action-item question).

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@grzegorz-roboflow

This PR is on hold pending your answer — the review will not advance to sign-off and the PR should not proceed to merge until the IMPORTANT question below is resolved.

No hard bug was found in the code — the three app-name references (modal_app.py, deploy_modal_app.py, modal_executor.py) are now consistently sourced from WEBEXEC_MODAL_APP_NAME, and the reconstructed label stays under the 56-char truncation threshold for the default value. The open item is an operational/backward-compat one about the changed production default.

IMPORTANT

  1. Production default flips from webexec to webexec-roboflow-platform. With PROJECT defaulting to roboflow-platform, the effective Modal app name changes for every production deployment that does not explicitly set WEBEXEC_MODAL_APP_NAME. How is the rollout coordinated so Custom Python Block Modal execution does not break?
    • Is the production Modal app being re-deployed under the new webexec-roboflow-platform name (via modal/deploy_modal_app.py), and does the inference-server rollout land after that deploy?
    • Is MODAL_WEB_ENDPOINT_URL set in production? If yes, note that the deploy/modal_app side will switch to the new app name while the executor keeps using the old override URL — deploy and runtime would then target different apps.
    • If the intent is to keep production on the existing webexec app and only branch by PROJECT for staging, should production pin WEBEXEC_MODAL_APP_NAME=webexec (and be documented as such)?

Optional

  1. modal/deploy_modal_app.py now calls modal.Cls.from_name(app_name=..., name=...) with keyword args (was positional). modal is unpinned in requirements/requirements.modal.txt; please confirm the installed Modal version accepts name= as the second parameter (older releases used tag). This is deploy-time only, so it would fail loudly rather than in production.
  2. The help text in deploy_modal_app.py:97 still prints the stale hardcoded example https://roboflow--webexec-executor-{truncated}.modal.run; consider updating it to reflect the new app name so the deployer isn't misled.

Re-review is not automatic: once you have answered and/or pushed changes, add the claude-review label (remove and re-add it to trigger again) to request a fresh review. Unanswered IMPORTANT questions may keep this PR out of a release.

Reviewed at HEAD: 9ea6edf

@grzegorz-roboflow

Copy link
Copy Markdown
Collaborator Author

Built cpu image from this branch & deployed to staging, and also deployed to modal; witnessed new modal app receiving requests as expected

@grzegorz-roboflow grzegorz-roboflow enabled auto-merge (squash) July 9, 2026 15:10
@grzegorz-roboflow grzegorz-roboflow merged commit 6f3e612 into main Jul 9, 2026
42 of 48 checks passed
@grzegorz-roboflow grzegorz-roboflow deleted the feat/modal-executor-staging branch July 9, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants