fix(cloud): parse HF ALLOW_HTTP the way object_store does - #10278
Open
jackylee-ch wants to merge 1 commit into
Open
jackylee-ch wants to merge 1 commit into
jackylee-ch wants to merge 1 commit into
Conversation
The Hugging Face store read `ALLOW_HTTP` as true only for `true`/`1`, while object_store itself — and vortex-cloud's own `property_as_bool` for the OpenDAL stores — accept `1`/`true`/`on`/`yes`/`y`. So `ALLOW_HTTP=on`, which works for every other scheme, left HF requiring HTTPS and a plain-HTTP Hub endpoint unreachable. Pull the object_store boolean spellings into one `parse_object_store_bool` helper and route both `allow_http` and `property_as_bool` through it, so the two cannot drift. Adds HF cases for the previously-rejected spellings. Signed-off-by: jackylee-ch <qcsd2011@gmail.com>
This branch has not been deployed
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.
The Hugging Face store read
ALLOW_HTTPas true only fortrue/1(hf/mod.rs:390),while object_store itself — and vortex-cloud's own
property_as_boolfor the OpenDAL stores(
opendal/mod.rs:213) — accept1/true/on/yes/ycase-insensitively. SoALLOW_HTTP=on,which works for every other scheme, left HF requiring HTTPS and a plain-HTTP Hub endpoint
unreachable. #9782 aligned the OpenDAL side to object_store but left HF behind.
Fix
Pull the object_store boolean spellings into one
parse_object_store_boolhelper and route bothallow_httpandproperty_as_boolthrough it, so the two cannot drift.property_as_bool'sbehaviour (including the warn-on-non-boolean) is unchanged.
Tests
Adds HF cases in
hf/tests.rsfor the previously-rejected spellings; theon/yes/ycasesfail before the change and pass after.
cargo test -p vortex-cloud --features hf, clippy, andcargo +nightly fmt --checkare clean.AI assistance
Written with agentic AI assistance; I read all three boolean-parsing sites and reproduced the
on/yesrejection before and after.