Page MenuHomeSoftware Heritage

cookers: add a max bundle size
ClosedPublic

Authored by seirl on Jan 11 2018, 6:09 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 12 2018, 9:38 AM
zack added a subscriber: zack.

One relevant change requested (make max size configurable) + one nit.
LGTM otherwise.

swh/vault/cookers/base.py
33

this should be a configuration option, rather than hard-coded

104

maybe instead of a string that just repeat the exception name the message can say what the limit was and that this bundle bypassed it?

112

loved the xkcd/sudo pun here :)

This revision now requires changes to proceed.Jan 12 2018, 9:38 AM
cookers: configurable max bundle size
zack requested changes to this revision.Jan 12 2018, 1:46 PM
zack added inline comments.
swh/vault/cookers/base.py
106

it looks like your units for the configuration part is bytes, not MiB, so this should be updated (sorry :-))

178

ditto

This revision now requires changes to proceed.Jan 12 2018, 1:46 PM

fix error message: MiB -> bytes

This revision was automatically updated to reflect the committed changes.