skip identical doesn't work with version id

Bug #2064675 reported by clayg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

vagrant@saio:~$ swift stat test test.big | grep ETag
                  ETag: "e90bdd237cc57f1b8308fcadf8f50f06"
vagrant@saio:~$ swift stat test test.big --version-id 1714404624.45423 | grep ETag
                  ETag: "cac0f63d4c7cfc6a4abdcb06b382e465"
vagrant@saio:~$ swift download test test.big -o delete.me
test.big [auth 0.006s, headers 0.076s, total 0.150s, 23.675 MB/s]
vagrant@saio:~$ swift download test test.big -o delete.me --skip-identical
Skipped identical file 'test.big'
vagrant@saio:~$ swift download test test.big -o delete.me --skip-identical --version-id 1714404624.45423
Skipped identical file 'test.big'

What seems to be going on is if-none-match request always sends the qs ?multipart-manifest=get and drops the &version-id=

https://github.com/openstack/python-swiftclient/blob/master/swiftclient/service.py#L1228-L1235

this means the "is identical" comparison always happens against the local file-name whatever that is and the "current" version stored in the bucket.

FWIW --skip-identical is mostly only used when downloading whole containers/prefixes and --version-id explicitly is only allowed for use with a single object - so I'm not sure how often people run into this use-case in practice. I only noticed it while reviewing something else [1]

1. 902020: support part-num in python swiftClient | https://review.opendev.org/c/openstack/python-swiftclient/+/902020

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.