Skip to content
Snippets Groups Projects

Add test_revision_add_fractional_timezone

Replaces !752 (closed)


Migrated from D6825 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Build is green

    Patch application report for D6825 (id=24749)

    Could not rebase; Attempt merge onto 7cb4128e...

    Updating 7cb4128e..824d823e
    Fast-forward
     requirements.txt                                |   2 +-
     swh/storage/postgresql/converters.py            |   7 +-
     swh/storage/tests/storage_tests.py              |  31 ++++
     swh/storage/tests/test_postgresql_converters.py | 187 +++++++++++++++++-------
     4 files changed, 174 insertions(+), 53 deletions(-)
    Changes applied before test
    commit 824d823e6f7d4b5aaca3c7ac78aa0dd63b3190f7
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 17:04:40 2021 +0100
    
        Add test_revision_add_fractional_timezone
    
    commit fb1b3a066ff0898318ea28c901761c5c3562f0f6
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 16:25:20 2021 +0100
    
        postgresql: Fix one-by-one error in db_to_date on negative dates
        
        Using `int()` on `date.timestamp()` rounded it up (toward zero),
        but the semantics of `model.Timestamp` is that the actual time is
        `ts.seconds + ts.microseconds/1000000`, so all negative dates were
        shifted one second up.
        
        In particular, this causes dates from
        `1969-12-31T23:59:59.000001` to `1969-12-31T23:59:59.999999`
        (inclusive) to smash into dates from
        `1970-01-01T00:00:00.000001` to `1970-01-01T00:00:00.999999`,
        which is how I discovered the issue.
    
    commit 34ca67e21f68de920f603223f629070683018c2a
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 16:23:44 2021 +0100
    
        postgresql: Add tests for db_to_date.

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

  • Author Maintainer

    Add workaround to support fractional timezones on psycopg2 < 2.9.0.

  • Author Maintainer

    Merge request was merged

  • closed

  • Build is green

    Patch application report for D6825 (id=24761)

    Could not rebase; Attempt merge onto 7cb4128e...

    Updating 7cb4128e..08e1adee
    Fast-forward
     swh/storage/postgresql/converters.py            |   7 +-
     swh/storage/postgresql/storage.py               |  10 +-
     swh/storage/tests/storage_tests.py              |  39 +++++
     swh/storage/tests/test_postgresql_converters.py | 187 +++++++++++++++++-------
     4 files changed, 190 insertions(+), 53 deletions(-)
    Changes applied before test
    commit 08e1adee3f65bd3a519a745be3848a44c6dd147c
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 17:04:40 2021 +0100
    
        Add test_revision_add_fractional_timezone
    
    commit fb1b3a066ff0898318ea28c901761c5c3562f0f6
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 16:25:20 2021 +0100
    
        postgresql: Fix one-by-one error in db_to_date on negative dates
        
        Using `int()` on `date.timestamp()` rounded it up (toward zero),
        but the semantics of `model.Timestamp` is that the actual time is
        `ts.seconds + ts.microseconds/1000000`, so all negative dates were
        shifted one second up.
        
        In particular, this causes dates from
        `1969-12-31T23:59:59.000001` to `1969-12-31T23:59:59.999999`
        (inclusive) to smash into dates from
        `1970-01-01T00:00:00.000001` to `1970-01-01T00:00:00.999999`,
        which is how I discovered the issue.
    
    commit 34ca67e21f68de920f603223f629070683018c2a
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 16:23:44 2021 +0100
    
        postgresql: Add tests for db_to_date.

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

  • Author Maintainer

    oops, I messed up git again, this isn't actually landed

  • Author Maintainer

    remove commit that was already landed

  • Build is green

    Patch application report for D6825 (id=24767)

    Rebasing onto fb1b3a06...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 08e1adee3f65bd3a519a745be3848a44c6dd147c
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 17:04:40 2021 +0100
    
        Add test_revision_add_fractional_timezone

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

  • Nicolas Dandrimont mentioned in merge request !836 (closed)

    mentioned in merge request !836 (closed)

  • Merge request was accepted

  • Nicolas Dandrimont approved this merge request

    approved this merge request

  • Author Maintainer

    indeed

  • Build is green

    Patch application report for D6825 (id=24796)

    Rebasing onto fb1b3a06...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 45687d8c68298abb69172386eca04e318eefc29c
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Dec 9 17:04:40 2021 +0100
    
        Add test_revision_add_fractional_timezone

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

  • Author Maintainer

    Merge request was merged

Please register or sign in to reply
Loading