Repository navigation
fix(admin): dedupe instances, treat 409 already-suspended as idempotent skip - #165
Merged
Merged
Conversation
…otent skip Part of Eyevinn/osaas-deploy-manager#1878 Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
Research ReviewVerified
Adjacent Stubs Detected
Orphaned Files Detected
Escape Hatch Coverage
Object Shape Verification
Contract diff
Impact Analysis
Risks Not Tested
Research Suggestions
VerdictNo blocking issues found. Reviewed by PR Research Validator. This review checks whether code is based on verified sources rather than assumptions. |
7 tasks
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.
Closes #164
Part of Eyevinn/osaas-deploy-manager#1878 (AC2).
Changes
getInstancesToRemovededupes by{serviceId, instanceName}(deploy-manager lists each pod separately).remove-exceeding-tenant-instances, aFetchErrorwithhttpCode === 409and message exactlyInstance is already suspendedis counted ininstancesAlreadySuspended, logged and skipped. All other 409 reasons and other non-2xx stay failures (exit code 1). Reason strings verified against deploy-managersrc/api_suspended.ts:93-115;createFetchputsreasonintoFetchError.message., {n} already suspended.Impact on existing consumers: the only consumer is the
admin-dailyCronJob. It parses no output (exit code only,restartPolicy: OnFailure). The summary gains a trailing field; exit code changes only for the already-suspended case, which no longer exits 1.remove-all-instancesalso benefits from the dedupe (it would otherwise remove the same instance twice). No release commit; releasing is a human step in #1886.Lessons
The deploy-manager
reasonsurfaces asFetchError.message(not a separate field), so matching on it needshttpCode === 409as well to avoid skipping a 500 with the same text. Line numbers in the issue had drifted but the premises held.Co-Authored-By: Claude noreply@anthropic.com
🤖 Generated with Claude Code