Skip to content

Fix nil pointer dereference in WaitForDeploymentToComplete#4993

Open
denik wants to merge 6 commits intomainfrom
denik/random-bugfixes-5
Open

Fix nil pointer dereference in WaitForDeploymentToComplete#4993
denik wants to merge 6 commits intomainfrom
denik/random-bugfixes-5

Conversation

@denik
Copy link
Copy Markdown
Contributor

@denik denik commented Apr 16, 2026

Changes

  • Fix nil pointer dereference in WaitForDeploymentToComplete when the app deployment Status field is nil. Add nil checks before accessing Status.State for both active and pending deployments.

Why

If the API returns a deployment object before its status is populated, the CLI panics with a nil pointer dereference during bundle deploy.

denik added 6 commits April 16, 2026 12:21
Add nil checks for AppDeployment.Status before accessing
Status.State. The Status field is a pointer that can be nil
when the API returns a deployment before its status is populated.
The OnProgress callback in the same file already had this check.

Task: 001.md

Co-authored-by: Isaac
…omplete

Change the condition from `Status != nil && State == InProgress` to
`Status == nil || State == InProgress`. When the API returns a deployment
with no status yet, the function now waits for it to complete instead
of silently skipping it.

Update the nil-Status test to use testserver.New(t) and verify that the
wait API endpoint is actually called.

Task: 002.md

Co-authored-by: Isaac
Co-authored-by: Isaac
Task: 003.md

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown

Waiting for approval

Based on git history, these people are best suited to review:

  • @andrewnester -- recent work in bundle/appdeploy/

Eligible reviewers: @anton-107, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

Suggestions based on git history. See OWNERS for ownership rules.

@denik denik requested a review from andrewnester April 16, 2026 14:17
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.

1 participant