Skip to content

fix(cloud): parse OpenDAL boolean properties the way object_store does - #9782

Open
jackylee-ch wants to merge 1 commit into
vortex-data:developfrom
jackylee-ch:fix/opendal-boolean-properties
Open

fix(cloud): parse OpenDAL boolean properties the way object_store does#9782
jackylee-ch wants to merge 1 commit into
vortex-data:developfrom
jackylee-ch:fix/opendal-boolean-properties

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

cos.rs and oss.rs compared the property string against "true" exactly, so True, 1 and
yes read as false. object_store accepts all of those for its own configuration
(config.rs, impl Parse for bool: 1/true/on/yes/y, lowercased), and so does the
allow_http sibling in hf/mod.rs — only the two OpenDAL services did not.

Values reach make_opendal_store verbatim from the caller's property map, and
warn_on_unknown_properties only warns about unknown keys, so an unusable value was silent:
skip_signature = "True" keeps signing a public bucket (403), and disable_config_load = "True"
leaves OpenDAL loading the ambient credentials the caller asked to turn off.

The new shared property_as_bool trims, lowercases, matches object_store's set, and warns
instead of answering false. goosefs has no boolean property.

Tests

cargo test --release -p vortex-cloud --features cos,oss,goosefs,hf,registry: 107 passed, 84 on
develop; feature matrix checked one flag at a time. Restoring the exact "true" compare fails
13 of the new cases.

AI assistance

Written with agentic AI assistance; I read object_store's Parse for bool in the vendored
0.13.2 source before matching it.

`cos` and `oss` compared the raw property string against `"true"`, so `True`,
`1` and `yes` — all accepted by `object_store` for its own configuration, and
by the `allow_http` sibling in this crate — read as `false` without a warning.

Add a shared `property_as_bool` next to `property_or_env` that trims, lowercases
and matches `object_store`'s set, and warns on a value that is not a boolean
instead of silently answering `false`.

Signed-off-by: jackylee-ch <qcsd2011@gmail.com>
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