Skip to content

Improve redeploy response with per-license status details#523

Open
SayeVikram wants to merge 1 commit into
google:mainfrom
SayeVikram:main
Open

Improve redeploy response with per-license status details#523
SayeVikram wants to merge 1 commit into
google:mainfrom
SayeVikram:main

Conversation

@SayeVikram
Copy link
Copy Markdown

Summary

  • Resolves the TODO in redeploy_licenses to return a more actionable response from PATCH /license/redeploy
  • Each license now reports individual terminate/create outcomes, overall status, and any errors
  • Adds top-level total, succeeded, and failed counters for quick health checks
  • Filters out invalid license records before processing to avoid null-pointer errors

Fixes #522

Details

Previously, the endpoint returned a single generic message ({"message": "Licenses redeployed."}) regardless of whether individual licenses succeeded or failed. Callers (CLI, automation) had no way to detect partial failures without reading server logs.

Now the response includes a results array with per-license detail:
{
"message": "Licenses redeployed.",
"total": 2,
"succeeded": 1,
"failed": 1,
"results": [
{
"license_id": "L1",
"client_name": "cds",
"previous_k8s_deployment_id": "k1",
"terminate": "success",
"create": "success",
"status": "success",
"errors": []
},
{
"license_id": "L2",
"client_name": "mars",
"previous_k8s_deployment_id": "k2",
"terminate": "success",
"create": "failed",
"status": "failed",
"errors": ["create: "]
}
]
}

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.

Improve /license/redeploy response with per-license status details

1 participant