-
- Downloads
Rename bundle types and use SWHIDs everywhere instead of raw sha1_git
The interfaces were a bit messy, as bundle types sometimes included the object type ('directory' was also a bundle type) and sometimes did not. Instead, the bundle types now do not include the object type at all, which means users do no have to care about what cooker will cook their bundle, they just need to provide a bundle type. Instead, the information about the object type is now carried along the object id, in a SWHID. This allows simplifying interfaces and removing multiple convertions (especially between hex and bytes). This is unfortunately a pretty large commit, as it is easier to change everything at once, than to try to make it incrementally and adding temporary convertions at some moving borders. It also invalidates the existing cache entirely, as it used bundle types and object ids as keys, which are now changed.
parent
d9e712cf
No related branches found
No related tags found
Showing
- swh/vault/api/client.py 4 additions, 0 deletionsswh/vault/api/client.py
- swh/vault/api/serializers.py 17 additions, 0 deletionsswh/vault/api/serializers.py
- swh/vault/api/server.py 4 additions, 1 deletionswh/vault/api/server.py
- swh/vault/backend.py 81 additions, 107 deletionsswh/vault/backend.py
- swh/vault/cache.py 16 additions, 16 deletionsswh/vault/cache.py
- swh/vault/cli.py 23 additions, 29 deletionsswh/vault/cli.py
- swh/vault/cookers/__init__.py 35 additions, 17 deletionsswh/vault/cookers/__init__.py
- swh/vault/cookers/base.py 27 additions, 25 deletionsswh/vault/cookers/base.py
- swh/vault/cookers/directory.py 4 additions, 3 deletionsswh/vault/cookers/directory.py
- swh/vault/cookers/git_bare.py 7 additions, 11 deletionsswh/vault/cookers/git_bare.py
- swh/vault/cookers/revision_flat.py 6 additions, 4 deletionsswh/vault/cookers/revision_flat.py
- swh/vault/cookers/revision_gitfast.py 4 additions, 2 deletionsswh/vault/cookers/revision_gitfast.py
- swh/vault/cooking_tasks.py 6 additions, 5 deletionsswh/vault/cooking_tasks.py
- swh/vault/in_memory_backend.py 11 additions, 13 deletionsswh/vault/in_memory_backend.py
- swh/vault/interface.py 9 additions, 10 deletionsswh/vault/interface.py
- swh/vault/sql/30-schema.sql 7 additions, 7 deletionsswh/vault/sql/30-schema.sql
- swh/vault/tests/test_backend.py 86 additions, 86 deletionsswh/vault/tests/test_backend.py
- swh/vault/tests/test_cache.py 30 additions, 28 deletionsswh/vault/tests/test_cache.py
- swh/vault/tests/test_cli.py 8 additions, 13 deletionsswh/vault/tests/test_cli.py
- swh/vault/tests/test_cookers.py 105 additions, 109 deletionsswh/vault/tests/test_cookers.py
Loading
Please register or sign in to comment