Make storage type names case-insensitive - #5419
Open
zhang-arvin wants to merge 1 commit into
Open
zhang-arvin wants to merge 1 commit into
zhang-arvin wants to merge 1 commit into
Conversation
dimas-b
reviewed
Aug 31, 2026
dimas-b
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your contribution, @zhang-arvin !
| ObjectNode node = (ObjectNode) treeNode; | ||
| JsonNode storageTypeNode = node.get("storageType"); | ||
| if (storageTypeNode != null && storageTypeNode.isTextual()) { | ||
| node.put("storageType", storageTypeNode.asText().toUpperCase()); |
Contributor
There was a problem hiding this comment.
Please use toUpperCase(Locale.ROOT) to avoid behaviour dependencies on the execution env.
Comment on lines
+270
to
+273
| JsonParser treeParser = treeNode.traverse(p.getCodec()); | ||
| treeParser.nextToken(); | ||
| return ctxt.readValue(treeParser, StorageConfigInfo.class); | ||
| } |
Contributor
There was a problem hiding this comment.
Could you add unit tests, please?
Member
|
See previous PR #1022. The values of the storage types is well defined in the spec and are effectively an API contract. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fixes #996: Storage type names are treated as case-sensitive (e.g., 's3' and 'S3' are treated differently), causing API calls to fail with "unsupported storage type" message.
Changes
Added a custom Jackson deserializer for
StorageConfigInfothat normalizes thestorageTypefield to uppercase during deserialization, so case variations like 's3', 'S3', 'gcs', 'GCS', 'azure', 'AZURE', 'file', 'FILE' are all accepted.How was this patch tested?