Page MenuHomeSoftware Heritage

Add test for snapshot_resolve_alias with a missing branch.
ClosedPublic

Authored by vlorentz on Nov 5 2020, 11:29 AM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D4414 (id=15636)

Rebasing onto 943e440a9f...

Current branch diff-target is up to date.
Changes applied before test
commit b00a21c7d084bd6df4bfa607a9b22dd6ec040b1f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 11:28:10 2020 +0100

    Add test for snapshot_resolve_alias with a missing branch.

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

hmm, the test crashes, but it's because the current implementation of snapshot_resolve_alias doesn't match the docstring.

Should I fix snapshot_resolve_alias in this commit too? (D4413 fixes the issue regardless)

Build has FAILED

Patch application report for D4414 (id=15638)

Rebasing onto 943e440a9f...

Current branch diff-target is up to date.
Changes applied before test
commit ae4724edf45aca4d039a4d47d8b9b443fbb7b455
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 11:28:10 2020 +0100

    Add test for snapshot_resolve_alias with a missing branch.

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

hmm, the test crashes, but it's because the current implementation of snapshot_resolve_alias doesn't match the docstring.

Should I fix snapshot_resolve_alias in this commit too? (D4413 fixes the issue regardless)

I think you should rebase the diff on D4413

This revision is now accepted and ready to land.Nov 5 2020, 11:54 AM

Build is green

Patch application report for D4414 (id=15641)

Could not rebase; Attempt merge onto 943e440a9f...

Updating 943e440a..5cb6d5d4
Fast-forward
 swh/storage/algos/snapshot.py            | 22 +++++++++++-----------
 swh/storage/tests/algos/test_snapshot.py | 21 ++++++++++++++++++---
 2 files changed, 29 insertions(+), 14 deletions(-)
Changes applied before test
commit 5cb6d5d417690d0928ab3efe8a049b1ff02f5cf6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 11:28:10 2020 +0100

    Add test for snapshot_resolve_alias with a missing branch.

commit 02d730401ff87ed26d1beab27781ab3aa3968e94
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 11:00:03 2020 +0100

    Simplify algos.snapshot.snapshot_resolve_alias.
    
    1. rename branch_info to last_branch
    2. exclude the last_branch from 'branches', so that:
       a) it never needs to contain a None value, so we don't need a cast
       b) no need for slicing

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

This revision was landed with ongoing or failed builds.Nov 5 2020, 12:07 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D4414 (id=15644)

Rebasing onto fa868346c6...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-1048-D4414.
Changes applied before test

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