Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide Metadata assert insides opendal's own tests features, #4608

Open
Xuanwo opened this issue May 14, 2024 · 0 comments
Open

hide Metadata assert insides opendal's own tests features, #4608

Xuanwo opened this issue May 14, 2024 · 0 comments

Comments

@Xuanwo
Copy link
Member

Xuanwo commented May 14, 2024

          OpenDAL has an assertion that to prevent users to access metadata that not been set. For example, visting etag from the metadata returned by list.

I feel the assertion from opendal is too aggressive. Perhaps we could leave those fields as None if they're not set.

We can hide those assert insides opendal's own tests features, so they won't be exposed to user side.

debug_assert!(
self.metakey.contains(Metakey::CacheControl)
|| self.metakey.contains(Metakey::Complete),
"visiting not set metadata: cache_control, maybe a bug"
);

Originally posted by @Xuanwo in #4581 (comment)

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

No branches or pull requests

1 participant