fix: resolve CRD property names that contain dots #636
No reviewers
Labels
No labels
API
Billing
UI/UX
dependencies
bug
change
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
servala/servala-portal!636
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dotted-crd-property-keys"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some CRDs keep INI-style sections as literal keys containing dots, e.g. Forgejo's config has 'service' and 'service.explore' as siblings. Splitting a field path on "." blindly therefore addresses the wrong place, and reads and writes have to agree on which reading wins.
walk_schema_path is now the single source of that precedence (longest literal property key first); split_field_path, is_valid_field_path, get_field_schema and get_schema_type are thin consumers of it, and get_value_at_path applies it to reads. Where no schema is reachable, the data's own keys are searched with backtracking instead of committing to the first shorter key and dying in a dead end.
Both drift checks now derive the expected value through the same parse and coerce pipeline the writer uses, so a bool in a map of strings is compared as "true" rather than True. That also fixes coercion being skipped for hardcoded param paths written without the redundant 'spec.' prefix.