Skip to content

fix: warn and exit early when deploy has no resources - #377

Open
Swigler wants to merge 1 commit into
runpod:mainfrom
Swigler:fix/warn-empty-resources-on-deploy
Open

fix: warn and exit early when deploy has no resources#377
Swigler wants to merge 1 commit into
runpod:mainfrom
Swigler:fix/warn-empty-resources-on-deploy

Conversation

@Swigler

@Swigler Swigler commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Detect empty resources in the manifest before uploading and print a clear warning instead of a misleading "✓ deployed to production".

Fixes #365

What was wrong

Client-mode endpoints (image=...) are excluded from the manifest's resources dict because they don't define serverless handlers. flash deploy would:

  1. Upload the build archive (wasting time and bandwidth)
  2. Create/update the environment
  3. Print "✓ deployed to production" and exit 0

No serverless endpoint was actually provisioned. The user sees success but has nothing deployed. The endpoint only gets created lazily on first endpoint() call.

What changed

Added an early check in _resolve_and_deploy() after validate_local_manifest():

  • If resources is empty, print a warning explaining that client-mode endpoints provision on first call
  • Return immediately without uploading or printing false success

This is the minimal fix. A more comprehensive approach (eagerly provisioning client-mode endpoints at deploy time) would require design discussion around the lazy-loading architecture.

Test plan

  • Client-mode apps with empty resources now get a clear warning instead of fake success
  • Normal apps with resources continue to deploy as before (the check only triggers on empty dict)

Client-mode endpoints (image=...) produce an empty resources dict in
the manifest because they have no handler code to deploy. Previously,
flash deploy would upload the archive, create the environment, and
print "✓ deployed to production" even though no serverless endpoint
was provisioned — a misleading success for a no-op.

Now detect the empty resources before uploading and print a clear
warning explaining that client-mode endpoints provision on first call.

Closes runpod#365
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.

flash deploy reports success for a client-mode (image=) app but provisions no endpoint

1 participant