From ce1fbd6d625ade9ce54da0b20eabad2ac0c553c9 Mon Sep 17 00:00:00 2001 From: "benjamin.baker" Date: Thu, 27 Aug 2026 05:38:56 -0400 Subject: [PATCH] fix container healthcheck false negative and register endpoints tables curl --fail exited nonzero on the login probe's 400 before the body reached grep VALIDATION_ERROR, so the healthcheck always failed and the container reported unhealthy while the app was fine. Drop --fail so grep decides pass/fail. Also register endpoint tables in PLUGIN_TABLE_OWNERS so plugin migrations can resolve their owned metadata. --- Dockerfile | 2 +- shopdb/plugins/alembic_template.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a747c3fe..034e0492 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,7 +92,7 @@ USER shopdb EXPOSE 5001 HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ - CMD curl --fail --silent http://localhost:5001/api/auth/login -X POST \ + CMD curl --silent http://localhost:5001/api/auth/login -X POST \ -H "Content-Type: application/json" -d '{}' \ | grep -q "VALIDATION_ERROR" || exit 1 diff --git a/shopdb/plugins/alembic_template.py b/shopdb/plugins/alembic_template.py index 70e272fe..d074d70c 100644 --- a/shopdb/plugins/alembic_template.py +++ b/shopdb/plugins/alembic_template.py @@ -51,6 +51,7 @@ PLUGIN_TABLE_OWNERS: dict[str, Iterable[str]] = { 'computers': ('computertypes', 'computers', 'computerinstalledapps', 'accessprotocols', 'computeraccess'), 'employees': ('directoryemployees',), + 'endpoints': ('endpointstates', 'endpointevents'), 'geenforce': ('manifestscopes', 'manifestentries', 'manifestentrypctypes', 'manifestentryhostnames', 'manifestentrymachinenumbers', 'manifestinusechecks', 'manifestinusecheckprocesses',