Skip to content

fix(server): move AlbHealthCheckLayer to A-position in pokemon-service example - #4788

Open
sachinsharma3191 wants to merge 1 commit into
smithy-lang:mainfrom
sachinsharma3191:fix-pokemon-healthcheck-layer
Open

fix(server): move AlbHealthCheckLayer to A-position in pokemon-service example#4788
sachinsharma3191 wants to merge 1 commit into
smithy-lang:mainfrom
sachinsharma3191:fix-pokemon-healthcheck-layer

Conversation

@sachinsharma3191

Copy link
Copy Markdown

Summary

  • The AlbHealthCheckLayer was registered in B-position (inside PokemonServiceConfig::builder()) on /ping, but the modeled CheckHealth operation already owns that route. The health check handler was never reached.
  • Moved the layer to A-position (wrapping the router after metrics_layer) and changed the path to /health so it does not collide with the modeled operation.
  • Updated the integration test to hit /health instead of /ping.

Fixes #4631, #3607, #3606

Test plan

  • Updated health_check integration test in examples/pokemon-service/tests/simple.rs to use /health
  • cargo build -p pokemon-service compiles
  • cargo test -p pokemon-service --test simple passes the health check test

…e example

The AlbHealthCheckLayer was registered in B-position (inside
PokemonServiceConfig) on `/ping`, but the modeled `CheckHealth`
operation already owns that route. The health check handler was
therefore never reached.

Move the layer to A-position (wrapping the router) and change the
path to `/health` so it does not collide with the modeled operation.
This correctly answers health checks before routing.

Fixes smithy-rs#4631, smithy-rs#3607, smithy-rs#3606
@sachinsharma3191
sachinsharma3191 requested review from a team as code owners August 17, 2026 03:30
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.

Pokemon service example: AlbHealthCheckLayer for /ping is redundant and unreachable

1 participant