Page MenuHomeSoftware Heritage

Revert "Restore 'offset' and 'negative_utc' arguments and make them optional"
ClosedPublic

Authored by vlorentz on Jan 21 2022, 2:54 PM.

Details

Summary

This reverts commit a0f5436273ef6f5b62a388ae131ed5afa7287d00
(ie. the second half of D6936, that was added after review).

This means this commit removes the 'offset' and 'negative_utc'
arguments.

It also removes the 'negative_utc' attribute (which is not used
anymore), but keeps an 'offset' property, which is an alias to
'offset_minutes()'. This is only to keep this commit readable;
the next commit will remove this alias.

This also affects the journal, as these fields are removed from .to_dict() -> D7003

Diff Detail

Repository
rDMOD Data model
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 D7011 (id=25415)

Rebasing onto a654060bf2...

Current branch diff-target is up to date.
Changes applied before test
commit e3b5349bbd685d364a2f62f627ff53b5fb9a943b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jan 21 14:51:18 2022 +0100

    Revert "Restore 'offset' and 'negative_utc' arguments and make them optional"
    
    This reverts commit a0f5436273ef6f5b62a388ae131ed5afa7287d00.
    
    This means this commit removes the 'offset' and 'negative_utc'
    arguments.
    
    It also removes the 'negative_utc' attribute (which is not used
    anymore), but keeps an 'offset' property, which is an alias to
    'offset_minutes()'. This is only to keep this commit readable;
    the next commit will remove this alias.

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

ardumont added a subscriber: ardumont.

lgtm

couple of question/suggestion inline.

swh/model/model.py
554

add logger.warn to check if that happens often or not (assuming we'll look at logs)?

swh/model/tests/test_identifiers.py
1053

--700?

This revision is now accepted and ready to land.Jan 26 2022, 11:34 AM
swh/model/model.py
554

even if we do see it in the logs, there is nothing we can do about it.

swh/model/tests/test_identifiers.py
1053

Yes. I kid you not, there are a few hundred commits with that specific timezone: T75#71479

Dulwich had issues with it as well. https://bugs.launchpad.net/dulwich/+bug/697828

Build is green

Patch application report for D7011 (id=26582)

Rebasing onto 118c8a44d7...

Current branch diff-target is up to date.
Changes applied before test
commit 07c7b4f151022f8ecdbaff6013cc71e36340d155
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jan 21 14:51:18 2022 +0100

    Revert "Restore 'offset' and 'negative_utc' arguments and make them optional"
    
    This reverts commit a0f5436273ef6f5b62a388ae131ed5afa7287d00.
    
    This means this commit removes the 'offset' and 'negative_utc'
    arguments.
    
    It also removes the 'negative_utc' attribute (which is not used
    anymore), but keeps an 'offset' property, which is an alias to
    'offset_minutes()'. This is only to keep this commit readable;
    the next commit will remove this alias.

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