Skip to content

Commit a08a061

Browse files
authored
Handle AwaitingApproval status in watch_deployment_status (#6797)
* Handle AwaitingApproval status in watch_deployment_status * Add changelog fragment
1 parent 93649a1 commit a08a061

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When a deployment requires approval, `reflex deploy` now reports that the build was submitted for approval and will deploy automatically once approved, instead of polling indefinitely.

packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,11 @@ def watch_deployment_status(deployment_id: str, client: AuthenticatedClient) ->
23352335
if "completed successfully" in status:
23362336
console.success(status)
23372337
break
2338+
if "AwaitingApproval" in status:
2339+
console.success(
2340+
"build submitted for approval; it will deploy automatically once an approver approves it."
2341+
)
2342+
break
23382343
if "build error" in status:
23392344
console.warn(status)
23402345
console.warn(
@@ -2350,10 +2355,9 @@ def watch_deployment_status(deployment_id: str, client: AuthenticatedClient) ->
23502355
if "bad response" in status:
23512356
console.warn(status)
23522357
return True
2353-
if status == current_status:
2354-
continue
2355-
current_status = status
2356-
console.info(status)
2358+
if status != current_status:
2359+
current_status = status
2360+
console.info(status)
23572361
time.sleep(0.5)
23582362
return True
23592363

0 commit comments

Comments
 (0)