Skip to content

[Bug report] /health.html returns 404 despite /health and /health/* aliases #10846

@markhoerth

Description

@markhoerth

Version

main branch

What version of Gravitino are you using?

main (commit 614302c, PR #10840)

What happened?

#10840 added root-level health aliases /health, /health/live, /health/ready that forward to /api/health/*. The aliases are documented as "for enterprise GTM standards that hardcode well-known root paths" but /health.html — one of the most commonly hardcoded GTM probe paths — returns 404.

Expected behavior

/health.html returns HTTP 200 with the same aggregate JSON body as /health and /api/health. .html is not a sub-path of /health; it's a legacy web-server convention used as a sibling, common in enterprise GTM onboarding standards that predate K8s-style probe endpoints.

Note on test gap

This regression slipped through because TestHealthAliasServlet tests mock getRequestDispatcher(), which validates the servlet's path-rewriting logic but doesn't exercise Jetty's path-spec matching in GravitinoServer.addServlet(...). The bug is one level up from what the unit test covers. Worth considering an integration test that boots the server and curls each GTM-relevant path.

Error message and/or stacktrace

./gradlew clean assembleDistribution -x test
./distribution/gravitino-1.3.0-SNAPSHOT-bin/bin/gravitino.sh start
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8090/health # 200 ✓
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8090/health.html # 404 ✗
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8090/api/health # 200 ✓

How to reproduce

./gradlew clean assembleDistribution -x test
./distribution/gravitino-1.3.0-SNAPSHOT-bin/bin/gravitino.sh start

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions