Skip to content

Commit

Permalink
Merge pull request #1181 from lsst-sqre/tickets/DM-47986
Browse files Browse the repository at this point in the history
DM-47986: Fix JSON serialization of Kopf healt probe
  • Loading branch information
rra authored Dec 11, 2024
2 parents f4bcbea + 7205ac1 commit ef342e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.d/20241210_164212_rra_DM_47986.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Bug fixes

- Return a JSON-serializable object from the health probe for the Kubernetes operator.
2 changes: 1 addition & 1 deletion src/gafaelfawr/operator/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ async def get_health(memo: kopf.Memo, **_: Any) -> dict[str, Any]:
health_check_service = factory.create_health_check_service()
await health_check_service.check(check_user_info=False)
await factory.session.remove()
return HealthCheck(status=HealthStatus.HEALTHY).model_dump()
return HealthCheck(status=HealthStatus.HEALTHY).model_dump(mode="json")

0 comments on commit ef342e2

Please sign in to comment.