Page MenuHomeSoftware Heritage

Rename obj_type to bundle_type
ClosedPublic

Authored by vlorentz on Aug 17 2021, 10:39 AM.

Details

Summary

'obj_type' was confusing, because it means 'the type of objects in the
vault backend', which is actually made of an object type (dir/rev/...)
AND the cooker name.

Plus, I want to reuse the name 'obj_type' in a future commit to reference
what is actually the object type, in the swh-model definition.

Event Timeline

Build is green

Patch application report for D6101 (id=22072)

Could not rebase; Attempt merge onto 149b1c1c31...

Updating 149b1c1..e3b5805
Fast-forward
 swh/vault/backend.py                  | 121 +++++++++++++++++-----------------
 swh/vault/cache.py                    |  28 ++++----
 swh/vault/cli.py                      |   6 +-
 swh/vault/cookers/__init__.py         |  14 ++--
 swh/vault/cookers/base.py             |  25 +++----
 swh/vault/cookers/git_bare.py         |  80 +++++++++++++++-------
 swh/vault/cookers/revision_gitfast.py |   2 +-
 swh/vault/cooking_tasks.py            |   8 +--
 swh/vault/in_memory_backend.py        |  18 ++---
 swh/vault/interface.py                |  14 ++--
 swh/vault/tests/test_backend.py       |  16 ++---
 swh/vault/tests/test_cli.py           |   9 ++-
 swh/vault/tests/test_cookers_base.py  |   2 +-
 swh/vault/tests/test_server.py        |   4 +-
 14 files changed, 197 insertions(+), 150 deletions(-)
Changes applied before test
commit e3b5805f2bceb11d18136ab024c01c844a19dc5d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 17 10:38:22 2021 +0200

    Rename obj_type to bundle_type
    
    'obj_type' was confusing, because it means 'the type of objects in the
    vault backend', which is actually made of an object type (dir/rev/...)
    AND the cooker name.
    
    Plus, I want to reuse the name 'obj_type' in a future commit to reference
    what is actually the object type, in the swh-model definition.

commit 6f395bee4b2ecba0661da4093846efd14278ba79
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:38:53 2021 +0200

    git_bare: add some modularity to directory creation
    
    It allows me to tweak the code to experiment

commit 22abc040f2fcfd930f231b07bea81f383b7d4620
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:04:49 2021 +0200

    git_bare: Add support for directories as snapshot branches

commit 0d7d0786c5f63e0164eadc4c0f65967a144d6831
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:03:31 2021 +0200

    git_bare: Skip loading empty lists

commit 0b3bf03d32a67422fd39e4d411471a23311ec253
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:01:56 2021 +0200

    git_bare: Deduplicate loading of release subgraphs

commit 03ab5a97b46b37eb6925ccb459893bce02ce7654
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 09:58:19 2021 +0200

    git_bare: Fix crash on dangling branches

commit 4d31b7a49a17531fe9d5de24f3085870e691a383
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 09:57:21 2021 +0200

    Disable bundle size limit when running from the CLI.

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

anlambert added a subscriber: anlambert.

LGTM, we should also rename that parameter in swh-web code related to the vault.

This revision is now accepted and ready to land.Aug 17 2021, 11:16 AM

Build is green

Patch application report for D6101 (id=22080)

Could not rebase; Attempt merge onto 38fcc30ba5...

Updating 38fcc30..cf6e9bd
Fast-forward
 swh/vault/backend.py                    | 121 ++++++++++++++++----------------
 swh/vault/cache.py                      |  28 ++++----
 swh/vault/cli.py                        |   5 +-
 swh/vault/cookers/__init__.py           |  14 ++--
 swh/vault/cookers/base.py               |  25 +++----
 swh/vault/cookers/git_bare.py           |  32 ++++++---
 swh/vault/cookers/revision_gitfast.py   |   2 +-
 swh/vault/cooking_tasks.py              |   8 +--
 swh/vault/in_memory_backend.py          |  18 ++---
 swh/vault/interface.py                  |  14 ++--
 swh/vault/tests/test_backend.py         |  16 ++---
 swh/vault/tests/test_cli.py             |   8 ++-
 swh/vault/tests/test_cookers_base.py    |   2 +-
 swh/vault/tests/test_git_bare_cooker.py | 105 +++++++++++++++++++--------
 swh/vault/tests/test_server.py          |   4 +-
 15 files changed, 236 insertions(+), 166 deletions(-)
Changes applied before test
commit cf6e9bd6a834761a2af0d2a1a60df566d60adad8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 17 10:38:22 2021 +0200

    Rename obj_type to bundle_type
    
    'obj_type' was confusing, because it means 'the type of objects in the
    vault backend', which is actually made of an object type (dir/rev/...)
    AND the cooker name.
    
    Plus, I want to reuse the name 'obj_type' in a future commit to reference
    what is actually the object type, in the swh-model definition.

commit 04a738807217ef5968cd62670a21374bff48748d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:38:53 2021 +0200

    git_bare: add some modularity to directory creation
    
    It allows me to tweak the code to experiment

commit 2320131e2331588ef8951ee9655dce46e0affcce
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 13 10:04:49 2021 +0200

    git_bare: Add support for directories as snapshot branches

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

This revision was automatically updated to reflect the committed changes.