Xuanwo opened a new pull request, #9310: URL: https://github.com/apache/opendal/pull/9310
# Which issue does this PR close? Relates to #2611. # Rationale for this change #9309 let callers read a Google Drive binary file by revision ID. On that baseline, `stat_with(path).version(id)` returned `Unsupported`. A fresh chunked reader needs the selected revision’s length to locate a suffix after an overwrite changes the file size. # What changes are included in this PR? The GDrive service advertises `stat_with_version` and uses Drive’s `revisions.get` for the resolved file ID and requested revision ID. It maps `id`, `size`, `mimeType`, and `modifiedTime` from the revision into OpenDAL metadata and documents the capability. A revision without a size returns `Unsupported`. # Are there any user-facing changes? Callers can pass a binary file’s revision ID to `stat_with(path).version(id)` to retrieve its ID, content length, MIME type, and last-modified time while Drive makes that revision available. Live verification on My Drive binary files at `aa2a5365b7` covered three cases: - After a 19-byte file was overwritten with 24 bytes, stat by revision ID matched the metadata recorded when each revision was current, including its distinct modification time. After a further overwrite with 43 bytes of `text/plain`, the 24-byte revision still reported `application/octet-stream`. - Two freshly opened chunked readers each requested a 22-byte suffix. The reader for the 19-byte revision returned all 19 bytes. The reader for the 24-byte revision returned its final 22 bytes. Both results matched the expected bytes exactly. - Selecting a revision ID from a different file returned `NotFound`, matching Drive’s HTTP 404. # Breaking changes # AI Usage Statement - Pi, `magpie/codex/gpt-6.2-sol`, `max` effort, implemented the GDrive changes and verified them against My Drive. An independent session using the same harness, model and effort reviewed the signed commit and the live verification results. - Pi, `magpie/codex/gpt-6.2-astra`, `high` effort, coordinated the work and drafted the PR description from the candidate diff and live verification results. -- 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]
