Page MenuHomeSoftware Heritage

origin_visit_update: Simplify api endpoint to pass only the visit
AbandonedPublic

Authored by ardumont on Mar 12 2020, 2:24 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

And not both the origin and the visit. The visit holds already the necessary
information we want about the origin.

Before (after adding the type effectively used)

def origin_visit_update(
   self, origin: Origin, visit: OriginVisit,
   status: Optional[str] = None,
   metadata: Optional[Dict] = None,
   snapshot: Optional[bytes] = None):

After:

def origin_visit_update(
        self,
        visit: OriginVisit,
        status: Optional[str] = None,
        metadata: Optional[Dict] = None,
        snapshot: Optional[bytes] = None) -> None:

Depends on D2821

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
d2822-origin-visit-update-type
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11091
Build 16722: tox-on-jenkinsJenkins
Build 16721: arc lint + arc unit

Event Timeline

Build is green

well, yeah D2822 cannot depends on D2822 for the green to be ok ;)

Closing as this will be rewritten with immutable origin visits (task to come ;)

Closing as this will be rewritten with immutable origin visits (task to come ;)

T2310