sundy-li opened a new issue, #7051:
URL: https://github.com/apache/opendal/issues/7051

   ### Describe the bug
   
   ```
   rev  `02953ef` will get `permissionDenied (permanent) at stat a unknonw 
file,`
   yet 0.55.0 will get `NotFound (permanent) at stat, context` 
   
   ```
   
   ### Steps to Reproduce
   
   
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=b41cc419c75ebd177bf3ddf0c49e132a
   
   
   
   
   cargo toml:
   ```
   opendal = { git = "https://github.com/apache/opendal.git";, rev = "02953ef", 
features = [
        # opendal = { version = "0.55.0", features = [
        "layers-fastrace",
        "layers-prometheus-client",
        "layers-async-backtrace",
        "services-s3",
        "services-fs",
        "services-gcs",
        "services-cos",
        "services-obs",
        "services-oss",
        "services-azblob",
        "services-azdls",
        "services-ipfs",
        "services-http",
        "services-moka",
        "services-webhdfs",
        "services-huggingface",
   ] }
   tokio = { version = "1.48.0", features = ["full"] }
   
   ```
   
   rev will get `permissionDenied (permanent) at stat,`
   yet 0.55.0 will get `NotFound (permanent) at stat, context:` 
   
   codes:
   ```
   #[cfg(test)]
   mod tests {
       use super::*;
    
   
       #[tokio::test]
       async fn test_opendal() {
           let endpoint_url = "http://127.0.0.1:9006";;
           let bucket = "test-bucket";
           let region = "";
           let access_key_id = "rustfsadmin";
           let secret_access_key = "rustfsadmin";
   
           let mut builder = opendal::services::S3::default()
               // Endpoint.
               .endpoint(endpoint_url)
               // Bucket.
               .bucket(bucket);
   
           {
               builder = builder.region("us-east-1");
           }
   
           // Always enable versioning support.
           builder = builder.enable_versioning(false);
   
           // Credential.
           builder = builder
               .access_key_id(access_key_id)
               .secret_access_key(secret_access_key)
               .session_token("")
               .role_arn("")
               .external_id("")
               // It's safe to allow anonymous since opendal will perform the 
check first.
               .allow_anonymous()
               // Root.
               .root("");
   
           // Disable credential loader
           // if false {
           //     builder = 
builder.disable_config_load().disable_ec2_metadata();
           // }
   
           // Enable virtual host style
           // if cfg.enable_virtual_host_style {
           //     builder = builder.enable_virtual_host_style();
           // }
           let op = opendal::Operator::new(builder).unwrap();
           let op = op.finish();
           let res = op.stat("databend_storage_checker").await;
           if let Err(e) = res {
               println!("e {}", e.to_string());
           } else {
               println!("res {:?}", res);
           }
       }
   }
   
   ```
   
   ### Expected Behavior
   
   `NotFound (permanent) at stat,
   
   ### Additional Context
   
   _No response_
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [ ] Yes, I would like to submit a PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to