Page MenuHomeSoftware Heritage

Add failure state for bundle tasks
ClosedPublic

Authored by seirl on Jan 10 2018, 5:30 PM.

Diff Detail

Repository
rDVAU Software Heritage Vault
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

zack requested changes to this revision.Jan 11 2018, 8:32 AM
zack added a subscriber: zack.

LGTM. Just a couple of nits

swh/vault/backend.py
55

i'd rather use a more neutral "we apologize for the inconvenience" here, to not encourage contacting us directly for every self-explanatory failure :)

318

Couldn't status values other than 'done' and 'failed' trickle down here? Either way, I'd like to see an explicit test for status == 'failed' here, and possibly a 3rd if/else taking care of the other (unexpected) cases resulting in a assertion error or something such

This revision now requires changes to proceed.Jan 11 2018, 8:32 AM
swh/vault/backend.py
55

Good point, I wanted to change that but forgot.

318

This should only be called when the bundle is done or failed, but adding a condition+warning to make sure of that doesn't hurt.

update with zack's comments

This revision is now accepted and ready to land.Jan 11 2018, 2:39 PM
This revision was automatically updated to reflect the committed changes.