Xuanwo commented on code in PR #5647:
URL: https://github.com/apache/opendal/pull/5647#discussion_r1966516113
##########
core/src/services/azblob/backend.rs:
##########
@@ -545,6 +545,7 @@ impl Access for AzblobBackend {
presign_stat: self.has_sas_token,
presign_read: self.has_sas_token,
presign_write: self.has_sas_token,
+ presign_delete: self.has_sas_token,
Review Comment:
If you don't intend to implement `presign_delete` support for `azblob` in
this PR, please leave this field unchanged so our tests will skip testing on
these services.
This comment applies to all services.
##########
core/tests/behavior/async_presign.rs:
##########
@@ -138,3 +139,32 @@ pub async fn test_presign_read(op: Operator) -> Result<()>
{
op.delete(&path).await.expect("delete must succeed");
Ok(())
}
+
+/// Presign delete should succeed.
+pub async fn test_presign_delete(op: Operator) -> Result<()> {
Review Comment:
Please check `op.full_capability().presign_delete` before starting this test.
##########
core/src/services/azblob/backend.rs:
##########
@@ -644,6 +645,7 @@ impl Access for AzblobBackend {
self.core
.azblob_put_blob_request(path, None, &OpWrite::default(),
Buffer::new())?
}
+ PresignOperation::Delete(_) => todo!(),
Review Comment:
We should avoid returning `todo!()` here, as it can cause the user's
application to panic. Instead, return an `Unsupported` error.
This comment applies to all services.
##########
core/src/docs/rfcs/0413_presign.md:
##########
@@ -115,6 +115,7 @@ Based on `Accessor::presign`, we will export public APIs in
`Operator`:
impl Operator {
fn presign_read(&self, path: &str) -> Result<PresignedRequest> {}
fn presign_write(&self, path: &str) -> Result<PresignedRequest> {}
+ fn presign_delete(&self, path: &str) -> Result<PresignedRequest> {}
Review Comment:
Please don't touch old RFC files.
--
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]