Skip to content

fix: only deploy newest build per app in scanExistingJobs - #103

Merged
biersoeckli merged 1 commit into
biersoeckli:mainfrom
tdussmann:fix/scan-existing-jobs-deploy-only-newest-build
Jul 31, 2026
Merged

fix: only deploy newest build per app in scanExistingJobs#103
biersoeckli merged 1 commit into
biersoeckli:mainfrom
tdussmann:fix/scan-existing-jobs-deploy-only-newest-build

Conversation

@tdussmann

Copy link
Copy Markdown
Contributor

...prevents rollback loops

When the build watch restarts (every ~40-60min on K8s watch expiry), scanExistingJobs processed every SUCCEEDED build job in alphabetical order, triggering a deployment for each. With multiple builds per app, the alphabetically-last (often older) job would overwrite the deployment, causing unnecessary pod restarts and rollbacks.

Now jobs are grouped by appId, sorted by creationTimestamp descending, and only the newest successful job triggers a deployment per app.

Fixes #100

…rollback loops

When the build watch restarts (every ~40-60min on K8s watch expiry),
scanExistingJobs processed every SUCCEEDED build job in alphabetical order,
triggering a deployment for each. With multiple builds per app, the
alphabetically-last (often older) job would overwrite the deployment,
causing unnecessary pod restarts and rollbacks.

Now jobs are grouped by appId, sorted by creationTimestamp descending,
and only the newest successful job triggers a deployment per app.

Fixes biersoeckli#100

Co-authored-by: HermesAgent <hermes@nousresearch.com>
@tdussmann
tdussmann force-pushed the fix/scan-existing-jobs-deploy-only-newest-build branch from 2fe902b to 6de7612 Compare July 4, 2026 19:33
@biersoeckli
biersoeckli merged commit 6f17478 into biersoeckli:main Jul 31, 2026
2 checks passed
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.

Possible rollout bug in quickstack's handling of recent builds

2 participants