Page MenuHomeSoftware Heritage

common/archive: Add branch names filtering support in lookup_snapshot
Needs ReviewPublic

Authored by anlambert on Nov 26 2020, 6:18 PM.

Details

Summary

Enable to filter returned branches according to their name in lookup_snapshot.

Using the optional branch_name_includes parameter will only return branches
whose names contain a substring in the provided list.

Using the optional branch_name_excludes parameter will not return branches
whose names contain a substring in the provided list.

This will enable to filter out bogus pull requests branches but also to implement
a search feature in branches/releases list view.

Build will fail as it depends on newly added filtering feature in swh-storage.

Related to T2782

Depends on D4615

Diff Detail

Repository
rDWAPPS Web applications
Branch
branches-filtering
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17556
Build 27137: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 27136: arc lint + arc unit

Unit TestsFailed

TimeTest
0 msJenkins > "before all" hook for "Should display properly entries"::Tests / Cypress tests / Run cypress tests / Test admin deposit page "before all" hook for "Should display properly entries"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should add/remove #swh-revision-changes url fragment when switching tab"::Tests / Cypress tests / Run cypress tests / Test Revision View "before all" hook for "should add/remove #swh-revision-changes url fragment when switching tab"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should ask for user to login"::Tests / Cypress tests / Run cypress tests / Test API tokens UI "before all" hook for "should ask for user to login"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should be hidden when on top"::Tests / Cypress tests / Run cypress tests / Back-to-top button tests "before all" hook for "should be hidden when on top"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should display accepted message when accepted"::Tests / Cypress tests / Run cypress tests / Origin Save Tests "before all" hook for "should display accepted message when accepted"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
View Full Test Results (73 Failed · 417 Passed · 5 Skipped)

Event Timeline

Build has FAILED

Patch application report for D4616 (id=16364)

Rebasing onto 8492a4c688...

Current branch diff-target is up to date.
Changes applied before test
commit 676cbce4a7e8bb31bf0a70e950e910f440ac5b9e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Nov 26 17:54:55 2020 +0100

    common/archive: Add branch names filtering support in lookup_snapshot
    
    Enable to filter returned branches according to their name in lookup_snapshot.
    
    Using the optional branch_name_includes parameter will only return branches
    whose names contain a substring in the provided list.
    
    Using the optional branch_name_excludes parameter will not return branches
    whose names contain a substring in the provided list.
    
    Related to T2782

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