Skip to content

fix(geo): normalize region aliases before allocating indexes - #11962

Open
embrace897 wants to merge 1 commit into
deepflowio:mainfrom
embrace897:codex/main-geo-region-alias
Open

embrace897 wants to merge 1 commit into
deepflowio:mainfrom
embrace897:codex/main-geo-region-alias

Conversation

@embrace897

Copy link
Copy Markdown

Region names are normalized only when writing generated Go tables. If the input contains both an alias and its canonical name, such as 黑龙 and 黑龙江, the generator allocates distinct indexes but emits duplicate map keys, making the generated file fail to compile.

Normalize region names before encoding them so aliases share one index. Add a regression covering both supported alias pairs.

Validation: the original generator fails the regression and its generated Go file fails to compile with duplicate map keys. With the patch, the Python regression and compilation of generated output with the production GeoInfo definition pass. Full geo/server tests and production-dataset validation were not run.

Prepared with AI assistance.

This branch has not been deployed

No deployments
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.

1 participant