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

feat(services/onedrive): List dir shows metadata #5632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

erickguan
Copy link
Contributor

Which issue does this PR close?

Part of #4746.

What changes are included in this PR?

Supports OneDrive lister with metadata.

Most my test folders have 0 in size, but one has 3. I didn't dig into
it.
Copy link
Contributor

@meteorgan meteorgan left a comment

Choose a reason for hiding this comment

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

The test workflow in .github/services is missing, we should add one.

oio::Entry::new(&normalized_path, Metadata::new(EntryMode::FILE))
}
let mut meta = Metadata::new(entry_mode)
.with_last_modified(
Copy link
Contributor

Choose a reason for hiding this comment

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

we have some time functions in chrono_utils.rs, like: parse_datetime_from_rfc2822. Maybe we could reuse them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the tip, added.

@Xuanwo
Copy link
Member

Xuanwo commented Feb 21, 2025

The test workflow in .github/services is missing, we should add one.

I remembered that we failed to set up a OneDrive test.

@erickguan erickguan force-pushed the onedrive-metadata branch 3 times, most recently from 26c9d63 to 3e64864 Compare February 21, 2025 21:43
@erickguan
Copy link
Contributor Author

erickguan commented Feb 21, 2025

I generated a token from a personal test account with Files.ReadWrite. This workflow run.

Additional permissions are useful for API Graph explorer which I recommend:

  • DelegatedPermissionGrant.ReadWrite.All
  • Directory.Read.All

What do you want me next? These actions look sensible:

  1. Merge this PR as is.
  2. Set up an OpenDAL test account.
  3. Fix bugs in a new PR.

@meteorgan
Copy link
Contributor

meteorgan commented Feb 22, 2025

I generated a token from a personal test account with Files.ReadWrite. This workflow run.

Additional permissions are useful for API Graph explorer which I recommend:

  • DelegatedPermissionGrant.ReadWrite.All
  • Directory.Read.All

What do you want me next? These actions look sensible:

  1. Merge this PR as is.
  2. Set up an OpenDAL test account.
  3. Fix bugs in a new PR.

Since we don't have a test workflow for this, have you run the tests locally ? You can use the command OPENDAL_TEST=onedrive cargo test behavior --features tests,services-onedrive -- --show-output. if all the tests pass, I think we can proceed with merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants