Page MenuHomeSoftware Heritage

cli: Add 'cook' command, to run cookers without Celery
ClosedPublic

Authored by vlorentz on Thu, Apr 29, 9:51 AM.

Details

Summary

Can be useful for testing without the full-blown SWH environment.

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

Build is green

Patch application report for D5640 (id=20125)

Rebasing onto 3ec2550051...

Current branch diff-target is up to date.
Changes applied before test
commit 74132a6be36b7aca8ea81ef9e6f60cbfc0203d7a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 29 09:51:04 2021 +0200

    cli: Add 'cook' command, to run cookers without Celery
    
    Can be useful for testing without the full-blown SWH environment.

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

ardumont added inline comments.
swh/vault/in_memory_backend.py
53

Great but can you split this new memory backend into its own commit?

good idea.

lgtm.

i'd split the in-memory-vault-backend into its own commit though even if the implementation is incomplete.

swh/vault/cli.py
100 ↗(On Diff #20125)

Isn't there a get_cooker factory already in the vault?

This revision is now accepted and ready to land.Thu, Apr 29, 10:28 AM
swh/vault/cli.py
100 ↗(On Diff #20125)

there is, but it instantiate a backend itself, and it's just too much trouble to work around it otherwise

Build is green

Patch application report for D5640 (id=20151)

Rebasing onto a1ca2a1966...

First, rewinding head to replay your work on top of it...
Applying: Add in_memory_backend.py
Applying: cli: Add 'cook' command, to run cookers without Celery
Changes applied before test
commit b7e2a442287b26115bab1e54b1e3729f3bf222ae
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 29 15:00:34 2021 +0200

    cli: Add 'cook' command, to run cookers without Celery
    
    Can be useful for testing without the full-blown SWH environment.

commit a3e325a6ce5855e87b6b3f3412e658a389483949
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 29 15:00:22 2021 +0200

    Add in_memory_backend.py
    
    It will be useful to implement a cooker CLI without needing
    an external storage backend.

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

swh/vault/cli.py
100 ↗(On Diff #20125)

ack ;)

Build is green

Patch application report for D5640 (id=20152)

Rebasing onto a1ca2a1966...

Current branch diff-target is up to date.
Changes applied before test
commit f87dd54d5d7b3c5d4a9ecbb054e811e97031d237
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 29 15:00:34 2021 +0200

    cli: Add 'cook' command, to run cookers without Celery
    
    Can be useful for testing without the full-blown SWH environment.

commit 8f9a3f197746a456fc61d9c2a5d443273fc406f6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 29 15:00:22 2021 +0200

    Add in_memory_backend.py
    
    It will be useful to implement a cooker CLI without needing
    an external storage backend.

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