emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.32k stars 685 forks source link

Incorrect Cache Key for Mapping #5714

Open sekar-saravanan opened 4 days ago

sekar-saravanan commented 4 days ago

Describe the bug _cache_key is getting generated incorrectly for mappings in ir.json, when using header with regex.

Steps to reproduce the behavior: Create mapping with regex header (attached mapping.yaml) Fetch ir.json generated by emissary (attached sample ir.json) Check the _cache_key of the mappings inside the groups block. Always _cache_key should be in the format of {kind}-{version}-{name}-{namespace}. But header_name is getting updated in the place of mapping name

Imapct If we plan to use the _cache_key in any feature ticket, it could get impacted.

Expected behavior Always _cache_key should be in defined format. {kind}-{version}-{name}-{namespace}

Versions (please complete the following information):

Additional context Attached the mapping.yaml and ir.json files. incorrect-cache-key.zip

sekar-saravanan commented 4 days ago

Fix added for this issue: https://github.com/emissary-ingress/emissary/pull/5715/files