Page MenuHomeSoftware Heritage

Set current_version attribute to postgresql datastore
ClosedPublic

Authored by ardumont on Jun 3 2022, 11:37 AM.

Details

Summary

Fixing the migration upgrade cli use.

Related to T4305

Test Plan

Trying it out on staging does fix the version cli (so the other ones as well).

swhstorage@storage1:~$ swh db --config-file config.yml version storage
WARNING the database does not have a dbmodule table.
module: storage
flavor: default
current code version: 182
version: 183

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29726
Build 46457: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 46456: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D7953 (id=28643)

Rebasing onto e64d64e4da...

Current branch diff-target is up to date.
Changes applied before test
commit 89560150ff253f1c316ef75ce59a37659ad59338
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jun 3 11:35:32 2022 +0200

    Set current_version attribute to postgresql datastore
    
    Related to T4305

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 3 2022, 11:38 AM
Harbormaster failed remote builds in B29726: Diff 28643!

Build has FAILED

Patch application report for D7953 (id=28647)

Rebasing onto e64d64e4da...

Current branch diff-target is up to date.
Changes applied before test
commit a9ce4fc7f46b3c5a0478a703a7ff62b9a2a5b33b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jun 3 11:35:32 2022 +0200

    Set current_version attribute to postgresql datastore
    
    This also simplifies the db collaborator code reusing core.db functions to check the
    code version and the actual db version matches.
    
    Related to T4305

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 3 2022, 11:53 AM
Harbormaster failed remote builds in B29730: Diff 28647!

Build is green

Patch application report for D7953 (id=28662)

Rebasing onto e64d64e4da...

Current branch diff-target is up to date.
Changes applied before test
commit 1c484ed2654ab08c8bc81fe3b2419923727fc3fb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jun 3 11:35:32 2022 +0200

    Set current_version attribute to postgresql datastore
    
    This also simplifies the db collaborator code reusing core.db functions to check the
    code version and the actual db version matches.
    
    Related to T4305

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

douardda added a subscriber: douardda.

lgtm (probably needs tedious hand-managed-db-migration-in-docker test)

This revision is now accepted and ready to land.Jun 3 2022, 3:29 PM

Fix current expected code version

lgtm (probably needs tedious hand-managed-db-migration-in-docker test)

I don't think there is much to do there actually.
The clis did not change much in docker so it should consistently get back to normal once those 2 diffs lands (storage, indexer-storage) and repositories are tagged.
(Then rebuild the docker env)

This revision was landed with ongoing or failed builds.Jun 3 2022, 3:53 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D7953 (id=28673)

Rebasing onto e64d64e4da...

Current branch diff-target is up to date.
Changes applied before test
commit c19f53f194d093ede82c8765e439e98c1de52cf9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jun 3 11:35:32 2022 +0200

    Set current_version attribute to postgresql datastore
    
    This also simplifies the db collaborator code reusing core.db functions to check the
    code version and the actual db version matches.
    
    Related to T4305

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