Skip to content

feat(services/swift): Added user metadata support for swift service #5601

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

Merged
merged 15 commits into from
Feb 10, 2025

Conversation

zhaohaidao
Copy link
Contributor

Which issue does this PR close?

Closes swift service task for #4842

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@zhaohaidao zhaohaidao requested a review from Xuanwo as a code owner February 2, 2025 19:00
@github-actions github-actions bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Feb 2, 2025
@Xuanwo
Copy link
Member

Xuanwo commented Feb 7, 2025

  2025-02-06T17:47:18.460667Z DEBUG opendal::services::swift::backend: swift: parsing user metadata from headers: {"content-type": "application/octet-stream", "content-length": "577389", "x-object-meta-location": "everywhere", "etag": "11faa613117db981663cbfaf955e9fbb", "last-modified": "Thu, 06 Feb 2025 17:47:19 GMT", "x-timestamp": "1738864038.41972", "accept-ranges": "bytes", "x-trans-id": "txb1b180da21ac419b815c8-0067a4f5a6", "x-openstack-request-id": "txb1b180da21ac419b815c8-0067a4f5a6", "date": "Thu, 06 Feb 2025 17:47:18 GMT"}
    at src/services/swift/backend.rs:239

  2025-02-06T17:47:18.460698Z DEBUG opendal::services::swift::backend: swift: parsed user metadata: {}
    at src/services/swift/backend.rs:242

  2025-02-06T17:47:18.460865Z DEBUG opendal::services: service=swift name= path=88a28177-2f9a-4352-82cb-7fea1c287579: stat finished
    at src/layers/logging.rs:220

thread '<unnamed>' panicked at tests/behavior/async_write.rs:250:42:
meta data must exist

@zhaohaidao
Copy link
Contributor Author

@Xuanwo CI passed. PTAL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please don't touch unrelated files.

@@ -221,12 +223,24 @@ impl Access for SwiftBackend {

async fn stat(&self, path: &str, _args: OpStat) -> Result<RpStat> {
let resp = self.core.swift_get_metadata(path).await?;
debug!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove debug lins like this.

let meta = parse_into_metadata(path, resp.headers())?;
let headers = resp.headers();
let mut meta = parse_into_metadata(path, headers)?;
// 添加日志:记录解析前的原始头部
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same.

@@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use log::debug;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add debug links in services.

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @zhaohaidao for working on this!

@Xuanwo Xuanwo merged commit 69c8fab into apache:main Feb 10, 2025
238 of 239 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
releases-note/feat The PR implements a new feature or has a title that begins with "feat"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants