Page MenuHomeSoftware Heritage

Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets
ClosedPublic

Authored by vlorentz on Dec 7 2021, 4:51 PM.

Details

Summary

For now it is filled from 'offset' and 'negative_utc', but it will replace them
in a future commit.

This is to simplify and add support for more 'weird' offsets we do not currently
support.

First step to resolve T3752.

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 D6776 (id=24595)

Rebasing onto c525484e47...

First, rewinding head to replay your work on top of it...
Applying: Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets
Changes applied before test
commit a5c27adb1170d8ed5670bfe6ee54511fda0b6c12
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 16:50:38 2021 +0100

    Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets
    
    For now it is filled from 'offset' and 'negative_utc', but it will replace them
    in a future commit.
    
    This is to simplify and add support for more 'weird' offsets we do not currently
    support.

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

I think the backwards-compatibility offset bytes should be +HHMM rather than just a serialization of int(offset)?

omg you're right, I confused it with the timestamp field

implement the right format

That makes much more sense!

This revision is now accepted and ready to land.Dec 8 2021, 3:11 PM

Build is green

Patch application report for D6776 (id=24627)

Could not rebase; Attempt merge onto c525484e47...

Updating c525484..6388395
Fast-forward
 swh/model/hypothesis_strategies.py  | 25 +++++++++++--------
 swh/model/model.py                  | 50 ++++++++++++++++++++++++++++++++++++-
 swh/model/tests/test_identifiers.py | 19 ++++++++++++--
 swh/model/tests/test_model.py       | 12 ++++++---
 4 files changed, 89 insertions(+), 17 deletions(-)
Changes applied before test
commit 63883957079247966fe6ab0dd7ac36b137b5280d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 16:50:38 2021 +0100

    Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets
    
    For now it is filled from 'offset' and 'negative_utc', but it will replace them
    in a future commit.
    
    This is to simplify and add support for more 'weird' offsets we do not currently
    support.

commit b065c139c8ab177b52f8113be12bae9c09fa5873
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 12:27:28 2021 +0100

    hypothesis_strategies: Ensure to generate valid directory entry name (again)

commit a2f4c79958bec48b21dcf7e0adf2f2dc78eac1d3
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 12:22:01 2021 +0100

    Revert "hypothesis_strategies: Ensure to generate valid directory entry name"
    
    This reverts commit c525484e473720ffcde89534d3ba89093bc8b016.

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

Build is green

Patch application report for D6776 (id=24632)

Could not rebase; Attempt merge onto f6e0a289ef...

Updating f6e0a28..c322904
Fast-forward
 swh/model/hypothesis_strategies.py  | 25 +++++++++++--------
 swh/model/model.py                  | 50 ++++++++++++++++++++++++++++++++++++-
 swh/model/tests/test_identifiers.py | 19 ++++++++++++--
 swh/model/tests/test_model.py       | 12 ++++++---
 4 files changed, 89 insertions(+), 17 deletions(-)
Changes applied before test
commit c32290481cbb6920da96ecc51fae96f3f0356bfe
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 16:50:38 2021 +0100

    Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets
    
    For now it is filled from 'offset' and 'negative_utc', but it will replace them
    in a future commit.
    
    This is to simplify and add support for more 'weird' offsets we do not currently
    support.

commit 52d6e0a5065a550cebd89bc5e9ecb2ed14bf7119
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 12:27:28 2021 +0100

    hypothesis_strategies: Ensure to generate valid directory entry name (again)

commit 4803d786d911848600ccab531071fbbbbe499aaa
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 12:22:01 2021 +0100

    Revert "hypothesis_strategies: Ensure to generate valid directory entry name"
    
    This reverts commit c525484e473720ffcde89534d3ba89093bc8b016.

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