Page MenuHomeSoftware Heritage

storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> Sha1Git
ClosedPublic

Authored by ardumont on Aug 3 2020, 1:27 PM.

Details

Summary

Basic but consistent across those "dag" object endpoints.

Related to T645

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14233
Build 21881: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 21880: arc lint + arc unit

Unit TestsFailed

TimeTest
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_retry::test_retrying_proxy_storage_directory_add
swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7fdefc1c72e8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fdefc1c7438>
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_retry::test_retrying_proxy_storage_directory_add_with_retry
monkeypatch_sleep = <_pytest.monkeypatch.MonkeyPatch object at 0x7fdf05aa10b8> swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7fdf05aa11d0> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fdf05aa1198>
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_retry::test_retrying_proxy_swh_storage_directory_add_failure
swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7fdf05181a90> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fdf05181208> mocker = <pytest_mock.plugin.MockFixture object at 0x7fdf05181048>
3 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_content
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_origin
View Full Test Results (3 Failed · 729 Passed · 15 Skipped)

Event Timeline

Build has FAILED

Patch application report for D3687 (id=12992)

Rebasing onto aa58e1092f...

Current branch diff-target is up to date.
Changes applied before test
commit 0d5b2552ab6c5c0dc2ae966130d900404ddd1005
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Aug 3 13:21:29 2020 +0200

    storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> bytes
    
    Related to T645

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/654/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/654/console

Drop unneeded checks which fails the build (the directory-add already tells it
added something).

This aligns directory-get-random with other endpoints, *get-random should
return something.

Build is green

Patch application report for D3687 (id=12993)

Rebasing onto aa58e1092f...

Current branch diff-target is up to date.
Changes applied before test
commit ad8c4c1132cab53607897544bdf7188414a5f7fa
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Aug 3 13:21:29 2020 +0200

    storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> bytes
    
    Related to T645

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

Could you return Sha1Git instead? (It's an alias of bytes for now, so it doesn't matter that much)

Could you return Sha1Git instead? (It's an alias of bytes for now, so it doesn't matter that much)

yes!

(I forgot i wanted to check!)

Fix signature to use Sha1Git

ardumont retitled this revision from storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> bytes to storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> Sha1Git.Aug 3 2020, 4:23 PM

Build is green

Patch application report for D3687 (id=12995)

Rebasing onto aa58e1092f...

Current branch diff-target is up to date.
Changes applied before test
commit 3c2e5a3d7d4332bf79afd40c2e0022d6eccc62be
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Aug 3 13:21:29 2020 +0200

    storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> Sha1Git
    
    Related to T645

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

This revision is now accepted and ready to land.Aug 3 2020, 5:58 PM