Page MenuHomeSoftware Heritage

Remove 'offset' and 'negative_utc'
ClosedPublic

Authored by vlorentz on Jan 13 2022, 12:20 PM.

Details

Summary

This only keeps 'offset_bytes' to store the timezone, to match swh-model
v5.0.0.

However, this keeps writing 'offset' and 'negative_utc' to the postgresql
database, just in case we need to roll back this change.
But they are not read anymore.

Test Plan

Will fail because this depends on D6936, which isn't released yet.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D6937 (id=25127)

Rebasing onto 40a57d4351...

Current branch diff-target is up to date.
Changes applied before test
commit 32e73f6a532acdefd86d3b61e6172dc730b5d42a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Jan 12 16:36:24 2022 +0100

    Remove 'offset' and 'negative_utc'
    
    This only keeps 'offset_bytes' to store the timezone, to match swh-model
    v5.0.0.
    
    However, this keeps writing 'offset' and 'negative_utc' to the postgresql
    database, just in case we need to roll back this change.
    But they are not read anymore.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 13 2022, 12:20 PM
Harbormaster failed remote builds in B25997: Diff 25127!

Build has FAILED

Patch application report for D6937 (id=25127)

Rebasing onto 40a57d4351...

Current branch diff-target is up to date.
Changes applied before test
commit 32e73f6a532acdefd86d3b61e6172dc730b5d42a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Jan 12 16:36:24 2022 +0100

    Remove 'offset' and 'negative_utc'
    
    This only keeps 'offset_bytes' to store the timezone, to match swh-model
    v5.0.0.
    
    However, this keeps writing 'offset' and 'negative_utc' to the postgresql
    database, just in case we need to roll back this change.
    But they are not read anymore.

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

lower swh-model version requirement

Build is green

Patch application report for D6937 (id=25185)

Rebasing onto 40a57d4351...

Current branch diff-target is up to date.
Changes applied before test
commit 8199ec40ebf319870cba585df50cb0373141b6df
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Jan 12 16:36:24 2022 +0100

    Remove 'offset' and 'negative_utc'
    
    This only keeps 'offset_bytes' to store the timezone, to support swh-model
    v5.0.0.
    
    However, this keeps writing 'offset' and 'negative_utc' to the postgresql
    database, just in case we need to roll back this change.
    But they are not read anymore.

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

We still query the fields out of the Postgres database (to ignore them in the db -> model object conversion), right? Should we stop doing that too?

Either way, I think this is good to go, thanks!

This revision is now accepted and ready to land.Jan 21 2022, 2:01 PM
In D6937#182150, @olasd wrote:

We still query the fields out of the Postgres database (to ignore them in the db -> model object conversion), right?

Yes

Should we stop doing that too?

It slightly complicates the code, so I would rather wait. They won't last long anyway.

Build is green

Patch application report for D6937 (id=25412)

Rebasing onto c68a4fd98f...

Current branch diff-target is up to date.
Changes applied before test
commit 2e7413888d8c5fcdaa410a3b76e8a4ee60b74873
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Jan 12 16:36:24 2022 +0100

    Remove 'offset' and 'negative_utc'
    
    This only keeps 'offset_bytes' to store the timezone, to support swh-model
    v5.0.0.
    
    However, this keeps writing 'offset' and 'negative_utc' to the postgresql
    database, just in case we need to roll back this change.
    But they are not read anymore.

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

This revision was automatically updated to reflect the committed changes.