google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

drive.Revisions returns incomplete list of revision Ids

Open FirefighterBlu3 opened this issue 3 years ago • 2 comments

Environment details

  • OS type and version:
    • Arch Linux
  • Python version: python --version
    • 3.10.1
  • pip version: pip --version
    • 22.0.4
  • google-api-python-client version: pip show google-api-python-client
    • 2.42.0

Steps to reproduce

  1. establish creds
  2. build service
  3. request revisions list

Code example

service = build('drive', 'v3', credentials=creds)
data = service.revisions().list(fileId=id, pageSize=100, fields="nextPageToken, revisions(id, modifiedTime)").execute()

The resulting list is roughly 35 items long. As it is an actively edited sheet, 1 or more times per day, I expected hundreds of revisions. As I have been writing this report, the original starting Id and ending Id have changed. The revision list should have gone back to June of last year. Instead, the revision modifiedTime timestamps only go back 3 weeks.

I can see the full revision history in the document itself.

FirefighterBlu3 avatar Apr 02 '22 00:04 FirefighterBlu3

Hi @FirefighterBlu3,

Please could you try out a similar request in the 'Try this API' interface on this page and check whether the issue still exists? This helps to confirm if this is a client library issue or an API issue. If it is an API issue, we'll redirect you to the API support channel so you can get better quality answers. For the Drive API please see https://developers.google.com/drive/api/v3/support.

parthea avatar Apr 04 '22 14:04 parthea

I ran into the same issue as @FirefighterBlu3. Seeing an inconsistent revision list which is incomplete, and to make things even funnier, changes when executed multiple times. That's bad - but what's good news for you: I can see this behaviour also when using the "try this method" on https://developers.google.com/drive/api/v3/reference/revisions/list . So AFAICT this is not an issue of google-api-python-client.

mephinet avatar Dec 19 '22 14:12 mephinet