When path_translation: CONSTANT_ADDRESS is used at the endpoint level and the address includes a resource path the ESP does not forward the request to the target backend address.
With the below configuration the requests are forwarded (the target backend returns 404 because there is nothing at root path):
/ourendpoint/healthz:
get:
summary: health check
operationId: ourEndpointhHealthz
x-google-backend:
address: https://ourendpoint-2jxxxxdi7a-lm.a.run.app
path_translation: CONSTANT_ADDRESS
protocol: h2
security: []
responses:
"200":
description: success
Screenshot below shows the GCP logs. The behavior is as expected

With the below configuration the Cloud Endpoint / ESP simply returns a 404 and does not attempt to forward to the target
/ourendpoint/healthz:
get:
summary: health check
operationId: ourEndpointhHealthz
x-google-backend:
address: https://ourendpoint-2jxxxxdi7a-lm.a.run.app/healthz
path_translation: CONSTANT_ADDRESS
protocol: h2
security: []
responses:
"200":
description: success
Screenshot below shows the GCP logs.

Expected behavior:
ESP forwards the request to address: https://ourendpoint-2jxxxxdi7a-lm.a.run.app/healthz when
path_translation: CONSTANT_ADDRESS is set
This is how it should work according to documentation https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#understanding_path_translation
Actual behavior
ESP returns a 404 and does not attempt to forward the request to the target backend when target address included a resource
Tested with 2.47.0 and 2.50.0
Please advise if this is a bug or me doing something wrong
When
path_translation: CONSTANT_ADDRESSis used at the endpoint level and theaddressincludes a resource path the ESP does not forward the request to the target backend address.With the below configuration the requests are forwarded (the target backend returns 404 because there is nothing at root path):
Screenshot below shows the GCP logs. The behavior is as expected
With the below configuration the Cloud Endpoint / ESP simply returns a 404 and does not attempt to forward to the target
Screenshot below shows the GCP logs.
Expected behavior:
ESP forwards the request to
address: https://ourendpoint-2jxxxxdi7a-lm.a.run.app/healthzwhenpath_translation: CONSTANT_ADDRESSis setThis is how it should work according to documentation https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#understanding_path_translation
Actual behavior
ESP returns a 404 and does not attempt to forward the request to the target backend when target address included a resource
Tested with 2.47.0 and 2.50.0
Please advise if this is a bug or me doing something wrong