Page MenuHomeSoftware Heritage

fuse: add error handling around HTTP errors (web API)
ClosedPublic

Authored by haltode on Oct 19 2020, 11:01 AM.

Diff Detail

Repository
rDFUSE FUSE virtual file system
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4301 (id=15189)

Rebasing onto 5c11efe3ae...

Current branch diff-target is up to date.
Changes applied before test
commit e7521a6eb4f8e541276120b262f6387b682c2875
Author: Thibault Allançon <haltode@gmail.com>
Date:   Mon Oct 19 10:55:23 2020 +0200

    fuse: add error handling around HTTP errors (web API)
    
    Closes T2709.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/98/ for more details.

zack requested changes to this revision.EditedOct 19 2020, 11:06 AM
zack added a subscriber: zack.

just a style matter: instead of "error during BLA: {err}", please use something like "cannot BLA: {err}", which is more relevant for the user

(I still haven't tried this, but I will before accepting)

Edit: I've now tested this, and it works fine !

This revision now requires changes to proceed.Oct 19 2020, 11:06 AM

Build is green

Patch application report for D4301 (id=15190)

Rebasing onto 5c11efe3ae...

Current branch diff-target is up to date.
Changes applied before test
commit a2f4be3df7801afae3cde5e11cf2107e92bb39dc
Author: Thibault Allançon <haltode@gmail.com>
Date:   Mon Oct 19 10:55:23 2020 +0200

    fuse: add error handling around HTTP errors (web API)
    
    Closes T2709.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/99/ for more details.

zack requested changes to this revision.Oct 19 2020, 11:15 AM
zack added inline comments.
swh/fuse/fuse.py
88

better: "Cannot fetch metadata for object {swhid}: {err}"

112

better: "Cannot fetch blob for object {swhid}: {err}"

233

This should be moved inside the for loop, this way one failure won't stop others.
Then, the message could be improved with more context, e.g.: "Cannot prefetch object {swhid}: {err}"

This revision now requires changes to proceed.Oct 19 2020, 11:15 AM

Build is green

Patch application report for D4301 (id=15192)

Rebasing onto 5c11efe3ae...

Current branch diff-target is up to date.
Changes applied before test
commit e178e7c4e2344ad7ef26f5d5359cb0c1d0a68db2
Author: Thibault Allançon <haltode@gmail.com>
Date:   Mon Oct 19 10:55:23 2020 +0200

    fuse: add error handling around HTTP errors (web API)
    
    Closes T2709.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/100/ for more details.

This revision is now accepted and ready to land.Oct 19 2020, 12:16 PM