Page MenuHomeSoftware Heritage

Deprecate /origin/branches route
ClosedPublic

Authored by jayeshv on Oct 22 2021, 4:14 PM.

Details

Summary

This fix deprecates and redirects /origin/branches?origin_url=<url> and
/origin/<url>/branches to /snapshot/branches/

  • test fixes
  • documentation changes

Related to T3608
Fixes T3687

Diff Detail

Repository
rDWAPPS Web applications
Branch
branch-route
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24802
Build 38727: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 38726: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D6541 (id=23780)

Rebasing onto 0c04ede6c0...

Current branch diff-target is up to date.
Changes applied before test
commit e0a3875f4d464a54a5c8ff6a305b4009d52c61f7
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Oct 22 16:11:01 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 22 2021, 4:33 PM
Harbormaster failed remote builds in B24665: Diff 23780!

Build has FAILED

Patch application report for D6541 (id=23924)

Rebasing onto 40f7d0d37c...

First, rewinding head to replay your work on top of it...
Applying: Deprecate /origin/branches route
Changes applied before test
commit 1428fcdc239b108bd9766de5976aef7508e79420
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Thu Oct 28 15:29:03 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 28 2021, 3:51 PM
Harbormaster failed remote builds in B24802: Diff 23924!

Build has FAILED

Patch application report for D6541 (id=23924)

Rebasing onto 40f7d0d37c...

First, rewinding head to replay your work on top of it...
Applying: Deprecate /origin/branches route
Changes applied before test
commit 2a8ce10942e8c7bce7ff2a9d33a2ad7150017af6
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Thu Oct 28 15:29:03 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

Build is green

Patch application report for D6541 (id=23934)

Rebasing onto 40f7d0d37c...

First, rewinding head to replay your work on top of it...
Applying: Deprecate /origin/branches route
Changes applied before test
commit cee7ae9e0a43fa39d350b741686c06723148675b
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Thu Oct 28 17:39:26 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

jayeshv retitled this revision from WIP-Deprecate /origin/branches route to Deprecate /origin/branches route.Oct 28 2021, 5:57 PM
jayeshv edited the summary of this revision. (Show Details)

Minor correction in doc string

Build is green

Patch application report for D6541 (id=23939)

Rebasing onto 40f7d0d37c...

First, rewinding head to replay your work on top of it...
Applying: Deprecate /origin/branches route
Changes applied before test
commit 0477c3d42a130a0423b3fe347d492f0512ada0ba
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Oct 29 10:23:43 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

anlambert added a subscriber: anlambert.

Looks good to me ! I added a couple of nitpick comments to handle before landing this.

swh/web/browse/views/origin.py
1

2021

swh/web/tests/browse/views/test_snapshot.py
1

License header is missing in that file, we need to add it.

22–25

Here, I would rather stack the pytest.mark.parametrize decorators for better test readability:

@pytest.mark.parametrize(
    "browse_context", ["log", "branches"]
)
@pytest.mark.parametrize(
    "template_used", ["revision-log.html", "branches.html"]
)

def test_snapshot_browse_with_id(client, browse_context, template_used, snapshot):
This revision is now accepted and ready to land.Oct 29 2021, 11:20 AM
swh/web/tests/browse/views/test_snapshot.py
22–25

@anlambert
The suggested solution seems to run 4 tests instead of the indented 2. (the cross product of both the parameters)

Build is green

Patch application report for D6541 (id=23941)

Rebasing onto 40f7d0d37c...

First, rewinding head to replay your work on top of it...
Applying: Deprecate /origin/branches route
Changes applied before test
commit a6494bcff6d5f2652869624b7e63ff407f611695
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Oct 29 11:59:49 2021 +0200

    Deprecate /origin/branches route
    
    This fix deprecates and redirects /origin/branches?origin_url=<url> and
    /origin/<url>/branches to /snapshot/branches/
    - test fixes
    - documentation changes
    
    Related to T3608
    Fixes T3687

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

This revision is now accepted and ready to land.Oct 29 2021, 4:10 PM

a741222342b5b74cd4ee9db1da8e99c280602524