Page MenuHomeSoftware Heritage

Consider unauthorized access to origin as a not found visit status
ClosedPublic

Authored by ardumont on Jan 21 2022, 2:06 PM.

Details

Summary

This currently fails the origin visit and update the visit status to 'failed'.

This got listed by listers but current access to such origin is actually private, it'd
probably make sense to make the status of the visit as not_found instead.

This takes care of the most frequent issue so (460k) [1].

[1] https://sentry.softwareheritage.org/share/issue/3a3663f8cc424a48999af28728152ef0/

Test Plan

tox still happy

Diff Detail

Repository
rDLDG Git loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7009 (id=25409)

Rebasing onto 4b77e567f8...

Current branch diff-target is up to date.
Changes applied before test
commit d886023089bd23004b2af6864cc6adae330e8598
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jan 21 14:00:05 2022 +0100

    Consider unauthorized access to origin as a not found visit status
    
    This currently fails the origin visit and update the visit status to 'failed'.
    
    This got listed by listers but current access to such origin is actually private, it'd
    probably make sense to make the status of the visit as not_found instead.

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

I think it will be better to add a new visit status, like restricted or unauthorized, what do you think ?

olasd added a subscriber: olasd.

On most forges, 403 errors are used in place of 404 errors (so you're not able to do discovery of private repositories by checking the return code). I think treating them as not found is correct.

This revision is now accepted and ready to land.Jan 21 2022, 2:43 PM

Build is green

Patch application report for D7009 (id=25422)

Rebasing onto 4b77e567f8...

Current branch diff-target is up to date.
Changes applied before test
commit aed18b7962814382f576660363318d842f9e5add
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jan 21 14:00:05 2022 +0100

    Consider unauthorized access to origin as a not found visit status
    
    This currently fails the origin visit and update the visit status to 'failed'.
    
    This got listed by listers but current access to such origin is actually private, it'd
    probably make sense to make the status of the visit as not_found instead.
    
    This takes care of the most frequent issue so (460k) [1].
    
    [1] https://sentry.softwareheritage.org/share/issue/3a3663f8cc424a48999af28728152ef0/

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