Page MenuHomeSoftware Heritage

Add a `swh provenance revision from-journal` command
ClosedPublic

Authored by douardda on Jul 8 2022, 11:52 AM.

Details

Summary

allowing to ingest revisions from the kafka journal.

Also provide a swh provenance revision from-csv command to replace the
swh provenance iter-revision command.

Also rename process_journal_objects as process_journal_origins
since it's only dealing with origins.

Diff Detail

Event Timeline

Build is green

Patch application report for D8098 (id=29237)

Rebasing onto af616497e1...

Current branch diff-target is up to date.
Changes applied before test
commit 357917df50aec745ec024b3d46306ed870e87c20
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:41:11 2022 +0200

    Add a `swh provenance revision from-journal` command
    
    allowing to ingest revisions from the kafka journal.
    
    Also provide a `swh provenance revision from-csv` command to replace the
    `swh provenance iter-revision` command.

commit 2492c8c97a2506b0aa2e1507af42f2c2fc37117f
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:34:35 2022 +0200

    Rename process_journal_objects as process_journal_origins
    
    since it's only dealing with origins.

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

Maybe a new cli test for the revision journal client would be nice

douardda retitled this revision from Rename process_journal_objects as process_journal_origins to Add a `swh provenance revision from-journal` command.Jul 8 2022, 2:27 PM
douardda edited the summary of this revision. (Show Details)
douardda edited the summary of this revision. (Show Details)

add a test

swh/provenance/tests/test_journal_client.py
130

oops :-)

swh/provenance/tests/test_journal_client.py
130

grr (thx)

Build has FAILED

Patch application report for D8098 (id=29244)

Rebasing onto af616497e1...

Current branch diff-target is up to date.
Changes applied before test
commit 545e14734f9df08759d4fcabb9621b05025a3048
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:41:11 2022 +0200

    Add a `swh provenance revision from-journal` command
    
    allowing to ingest revisions from the kafka journal.
    
    Also provide a `swh provenance revision from-csv` command to replace the
    `swh provenance iter-revision` command.

commit 2492c8c97a2506b0aa2e1507af42f2c2fc37117f
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:34:35 2022 +0200

    Rename process_journal_objects as process_journal_origins
    
    since it's only dealing with origins.

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

Build is green

Patch application report for D8098 (id=29247)

Rebasing onto af616497e1...

Current branch diff-target is up to date.
Changes applied before test
commit 719a74d881415a5ff3601d7a4b57c342764dd2ce
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:41:11 2022 +0200

    Add a `swh provenance revision from-journal` command
    
    allowing to ingest revisions from the kafka journal.
    
    Also provide a `swh provenance revision from-csv` command to replace the
    `swh provenance iter-revision` command.

commit 2492c8c97a2506b0aa2e1507af42f2c2fc37117f
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:34:35 2022 +0200

    Rename process_journal_objects as process_journal_origins
    
    since it's only dealing with origins.

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

olasd requested changes to this revision.Jul 8 2022, 2:55 PM

Looks like some copy-and-waste happened here, sorry I hadn't noticed at first !

swh/provenance/cli.py
364–372

Looks like you're using the wrong function here

382

and the wrong object type here

This revision now requires changes to proceed.Jul 8 2022, 2:55 PM

fix mistakes reported by olasd (thx a lot) and handle dates in process_journal_recisions

Build is green

Patch application report for D8098 (id=29253)

Rebasing onto af616497e1...

Current branch diff-target is up to date.
Changes applied before test
commit e30e9f68262f079468dc7491c2c958530131af16
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:41:11 2022 +0200

    Add a `swh provenance revision from-journal` command
    
    allowing to ingest revisions from the kafka journal.
    
    Also provide a `swh provenance revision from-csv` command to replace the
    `swh provenance iter-revision` command.

commit 2492c8c97a2506b0aa2e1507af42f2c2fc37117f
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jul 8 11:34:35 2022 +0200

    Rename process_journal_objects as process_journal_origins
    
    since it's only dealing with origins.

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

This revision is now accepted and ready to land.Jul 8 2022, 5:51 PM