Page MenuHomeSoftware Heritage

Fix bugs when retrieving parents in RevisionEntry
ClosedPublic

Authored by aeviso on Jun 17 2021, 2:00 PM.

Details

Summary

Convert Revision.date from` TimestampWithTimezone` to datetime as expected by` RevisionEntry`.
Create a list with the iterator returned by ArchiveInterface.revision_get () before comparison.

Diff Detail

Repository
rDPROV Provenance database
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 D5884 (id=21084)

Rebasing onto c9d1369ba1...

Current branch diff-target is up to date.
Changes applied before test
commit 12edf4a3b7992575f5f24cd8a648c803dbda142a
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Thu Jun 17 13:48:24 2021 +0200

    Fix bugs when retrieven parents in RevisionEntry

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

douardda added a subscriber: douardda.

Thanks a lot for the split.

A few things and we are good:

  • there is typo in the commit message
  • it would be nice for this commit message to describe which bugs are being fixed
  • use to_datetime() (remember to bump the version dependency on swh.model for this)

Thanks

swh/provenance/model.py
97

please use the new TimestampWithTimwzone.to_datetime() recently added in swh.model (in v2.6.0) instead.

This revision now requires changes to proceed.Jun 18 2021, 9:55 AM
swh/provenance/model.py
97

sure. It just wasn't there when this modification was originally done

Build is green

Patch application report for D5884 (id=21130)

Rebasing onto 8ff1ab5860...

Current branch diff-target is up to date.
Changes applied before test
commit d28d3eed7049e36c5841405021fd0a0e78c11cb7
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Thu Jun 17 13:48:24 2021 +0200

    Fix bugs when retrieving parents in RevisionEntry
    
    Convert `Revision.date` from` TimestampWithTimezone` to `datetime` as expected by` RevisionEntry`.
    
    Create a list with the iterator returned by `ArchiveInterface.revision_get ()` before comparison.

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

swh/provenance/model.py
97

sure. It just wasn't there when this modification was originally done

indeed, since I've added it explicitly for this :-)

thanks, the diff looks much simpler now :-)

Just include the version constraint (swh.model >= 2.6) in requirements-swh.txt and we are good.

This revision is now accepted and ready to land.Jun 18 2021, 2:26 PM
aeviso retitled this revision from Fix bugs when retrieven parents in RevisionEntry to Fix bugs when retrieving parents in RevisionEntry.Jun 18 2021, 3:23 PM
aeviso edited the summary of this revision. (Show Details)

Build is green

Patch application report for D5884 (id=21138)

Rebasing onto 8ff1ab5860...

Current branch diff-target is up to date.
Changes applied before test
commit cd48f9d71efeaf73cfcc24f397d22589a5f7987b
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Thu Jun 17 13:48:24 2021 +0200

    Fix bugs when retrieving parents in RevisionEntry
    
    Convert `Revision.date` from` TimestampWithTimezone` to `datetime` as expected by` RevisionEntry`.
    Create a list with the iterator returned by `ArchiveInterface.revision_get()` before comparison.

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

Build is green

Patch application report for D5884 (id=21170)

Rebasing onto 011645221c...

Current branch diff-target is up to date.
Changes applied before test
commit e6f39d0244b10b49942b0ab93d4628828e343642
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Thu Jun 17 13:48:24 2021 +0200

    Fix bugs when retrieving parents in RevisionEntry
    
    Convert `Revision.date` from` TimestampWithTimezone` to `datetime` as expected by` RevisionEntry`.
    Create a list with the iterator returned by `ArchiveInterface.revision_get()` before comparison.

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