Page MenuHomeSoftware Heritage

cgit: Ensure the clone url is searched on the right tab
ClosedPublic

Authored by vsellier on Sep 20 2022, 10:11 AM.

Details

Summary

For some forges, the default tab for a repository detail is not the
summary tab so the clone urls are not detected and the repository
is ignored [1].

[1] T4505#91387

Related to T4544

Test Plan
  • tox is happy
  • git.acdw.net is happy
  • all the cgit forge declared in production are correctly listed

Diff Detail

Repository
rDLS Listers
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 31632
Build 49475: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 49474: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8508 (id=30633)

Rebasing onto fa65f270ed...

Current branch diff-target is up to date.
Changes applied before test
commit 3d71200ee0e57c6463e8a78ae3ede061b9be6149
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Sep 20 09:58:15 2022 +0200

    cgit: Ensure the clone url is searched on the right tab
    
    For some forges, the default tab for a repository detail is not the
    summary tab so the clone urls are not detected and the repository
    is ignored
    
    Related to T4544

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

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/lister/cgit/lister.py
184–186

I think it would be better to iterate on the tab links and fetch the URL associated to the tab with the text summary, this would be more generic.

For instance in that cgit repository, the summary link does not end with /summary

This revision now requires changes to proceed.Sep 20 2022, 11:28 AM
swh/lister/cgit/lister.py
184–186

yes sure it would be better, I will update to do that.

For what I saw when I tested, when the summary tab is not /summary, it's because it's the default tab so it's active.

retrieve the summary tab url from the page instead of using an hardcoded url

Build is green

Patch application report for D8508 (id=30651)

Rebasing onto bd35d54398...

First, rewinding head to replay your work on top of it...
Applying: cgit: Ensure the clone url is searched on the right tab
Changes applied before test
commit a3cc9ef58862d052d408c23b91641c4bfcedac53
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Sep 20 09:58:15 2022 +0200

    cgit: Ensure the clone url is searched on the right tab
    
    For some forges, the default tab for a repository detail is not the
    summary tab so the clone urls are not detected and the repository
    is ignored
    
    Related to T4544

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

Looks good to me, thanks !

This revision is now accepted and ready to land.Sep 20 2022, 4:48 PM

Build is green

Patch application report for D8508 (id=30653)

Rebasing onto bd35d54398...

Current branch diff-target is up to date.
Changes applied before test
commit 9b3e565cf7de534f3adc4e52da3b9cc9321ee431
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Sep 20 09:58:15 2022 +0200

    cgit: Ensure the clone url is searched on the right tab
    
    For some forges, the default tab for a repository detail is not the
    summary tab so the clone urls are not detected and the repository
    is ignored
    
    Related to T4544

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