fix: allow ps resize before an app's first release#156
Open
dmonroy wants to merge 1 commit into
Open
Conversation
LoadDeployStatus treated a missing DEPLOYSTATUS DynamoDB item as a fatal error, so ps resize (and ps) crashed for any app that had never had a successful release, instead of falling through to the existing graceful handling for a not-yet-created service. Add a sentinel error for the DynamoDB not-found case and only treat that specific case as non-fatal, leaving DeployStatus nil. Other errors (auth, throttling, etc.) still fail loudly. GetServices gets a nil-guard since LoadDeployStatus no longer errors in this case. Verified against a real app across three AppPack CLI versions: works correctly with this fix, crashes on v4.7.0+, and worked by accident on v4.6.7 (errors from LoadDeployStatus were silently discarded there until a later cleanup made them fatal).
blsmth
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ps resize(andpslist) crashed withcould not find DDB item ... DEPLOYSTATUSfor any app that had never had a successful release, even thoughps resizeis explicitly designed to support setting a size before the first deploy.psResizeCmdfrom silently discardingLoadDeployStatus()'s error to treating it as fatal viacheckErr. Before that commit (v4.6.7), a missingDEPLOYSTATUSitem never surfaced, so the command fell through to the existing graceful "service does not exist" handling by accident.ErrDDBItemNotFound, and only treat that specific case as non-fatal inLoadDeployStatus(leavingDeployStatusnil), rather than reverting to silently discarding all errors. Real errors (auth, throttling, etc.) still fail loudly, unlike the old v4.6.7 behavior.GetServicesgets a nil-guard it needs now thatLoadDeployStatuscan return a nilDeployStatuswithout erroring.cmd/ps.go— bothps resizeandps(list) already handle a nilDeployStatusgracefully viaFindProcess's existing nil-receiver check; this also fixespslist's identical, longer-standing bug (predates Formatting cleanup 🧹 #102).Test plan
go build ./...,go vet ./...,go test ./...,gofmt -lall cleanLoadDeployStatus's non-fatal path,GetServices's nil-guard) aren't covered by an automated test — no DynamoDB-mocking infra exists in this repo to exercise them in isolation