Skip to content

Comments

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

Merged
Xuanwo merged 15 commits intoapache:mainfrom
zhaohaidao:swift
Feb 10, 2025
Merged

feat(services/swift): Added user metadata support for swift service#5601
Xuanwo merged 15 commits intoapache:mainfrom
zhaohaidao:swift

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.


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.

// 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