-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Slight readability improvement on etag preparation for files #771
Conversation
7fc7f29
to
8b38143
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to find an explanation of a situation when the e_tag
is None
, but didn't find where it is. Would be interesting to share what is the situation when the e_tag
is None
and put it as a comment in the code.
IMO if such situation is real, we better return None
than ""
, as we are lying whether the e_tag
is present. So instead of adding the two if
s, it seems changing the return type makes more sense to me.
The above thoughts might be wrong when I see the reason when this happens.
My bad, I narrowed the issue down to its actual culprit. |
@why-not-try-calmer I am still not sure when the |
Okay so thanks for showing how this in itself was not a bug. I've removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It turned out very strange behaviour that confirmed my suspision - you had a version about deletion of the file.
As of current
master
thee_tag
property ofS3ObjectVersion
will evaluate toNone
in certain edge cases, causing Exceptions (see for example https://github.com/opengisch/qfieldcloud-private/pull/474). This PR ensuresS3ObjectVersion.e_tag
never lies about its type.