feat: update active hosted deployment compute - #526
Conversation
|
Superseded by #527 on the repository-compliant ALIEN-611 branch. |
Greptile SummaryThe PR routes compute changes for active hosted push deployments through the Platform API and adds a focused HTTP contract test.
Confidence Score: 4/5The early return must be fixed before merging because an update that includes compute can report success while silently dropping other requested deployment changes. The new hosted-compute branch handles only the compute comparison or PATCH and then exits before the existing public-endpoint validation and remaining deployment update flow. Files Needing Attention: crates/alien-deploy-cli/src/commands/up.rs
|
| Filename | Overview |
|---|---|
| crates/alien-deploy-cli/src/commands/up.rs | Adds the hosted compute PATCH and its test, but the enclosing early returns discard other requested changes. |
| crates/alien-deploy-cli/Cargo.toml | Adds the workspace-managed httpmock development dependency used by the new unit test. |
| Cargo.lock | Adds the existing workspace httpmock package as a dependency of alien-deploy-cli. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[alien-deploy up] --> B[Initialize and fetch deployment]
B --> C{Running hosted push deployment with compute?}
C -->|No| D[Existing validation and deployment flow]
C -->|Yes| E{Compute changed?}
E -->|Yes| F[PATCH Platform compute endpoint]
E -->|No| G[Report compute already configured]
F --> H[Return]
G --> H
H -. bypasses .-> I[Public endpoint validation and other updates]
Prompt To Fix All With AI
### Issue 1
crates/alien-deploy-cli/src/commands/up.rs:1344-1350
**Early return drops requested settings**
When a running hosted push deployment is updated with compute plus other settings, both compute branches return before the remaining update flow, causing the command to report success without validating or applying settings such as public endpoints.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(deploy-cli): update active hosted c..." | Re-trigger Greptile
| return Ok(()); | ||
| } | ||
| output::success(&format!( | ||
| "Deployment '{}' already has the requested compute settings.", | ||
| name | ||
| )); | ||
| return Ok(()); |
There was a problem hiding this comment.
Early return drops requested settings
When a running hosted push deployment is updated with compute plus other settings, both compute branches return before the remaining update flow, causing the command to report success without validating or applying settings such as public endpoints.
Knowledge Base Used: CLI and deployment workflows
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/alien-deploy-cli/src/commands/up.rs
Line: 1344-1350
Comment:
**Early return drops requested settings**
When a running hosted push deployment is updated with compute plus other settings, both compute branches return before the remaining update flow, causing the command to report success without validating or applying settings such as public endpoints.
**Knowledge Base Used:** [CLI and deployment workflows](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/cli-and-deployment.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Test
cargo test -p alien-deploy-cli hosted_compute_update_uses_deployment_token_and_exact_payload --libcargo check -p alien-deploy-clicargo fmt -p alien-deploy-cli -- --check