Skip to content

fix: normalize environment_name to uppercase in api#39

Merged
sebastianwebber merged 1 commit intomainfrom
seba/fix-env-parse
Feb 6, 2026
Merged

fix: normalize environment_name to uppercase in api#39
sebastianwebber merged 1 commit intomainfrom
seba/fix-env-parse

Conversation

@sebastianwebber
Copy link
Contributor

Fix case sensitivity bug where API returns zero memory values when environment_name parameter uses mixed case (e.g., "Mixed" instead of "MIXED"). Profile lookups in memory configuration maps require uppercase keys, but API was doing direct type cast without validation.

This caused all memory parameters (shared_buffers, effective_cache_size, work_mem, maintenance_work_mem) to return 0 when map lookups failed.

Add profile.Parse() function to centralize parsing logic and ensure case-insensitive matching through existing Set() normalization.

Fixes #37

Fix case sensitivity bug where API returns zero memory values when
environment_name parameter uses mixed case (e.g., "Mixed" instead of
"MIXED"). Profile lookups in memory configuration maps require
uppercase keys, but API was doing direct type cast without validation.

This caused all memory parameters (shared_buffers, effective_cache_size,
work_mem, maintenance_work_mem) to return 0 when map lookups failed.

Add profile.Parse() function to centralize parsing logic and ensure
case-insensitive matching through existing Set() normalization.

Fixes #37

Signed-off-by: Sebastian Webber <sebastian@swebber.me>
@sebastianwebber sebastianwebber merged commit ab63950 into main Feb 6, 2026
14 checks passed
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.

Export Config / API gives wrong output

1 participant