Page MenuHomeSoftware Heritage

Update storage for swh.core 2.0.0
ClosedPublic

Authored by douardda on Feb 11 2022, 4:20 PM.

Details

Summary
  • Add expected entry points for swh.core 2 db handling new features:
    • add a `swh.storge.get_datastore()` function
    • add `swh.storage.postgreql.storage.Storage.get_current_version()` method
    • move sql migration scripts in `swh/storage/sql/upgrades`
    • modify sql initialization scripts to match swh.core 2 (remove dbversion management code).
  • Update tests to use the new template-based database handling; this should have only minimal impact on test execution performances.

Depends on D7155
Related to T3894

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 D7160 (id=25954)

Rebasing onto f578377db5...

Current branch diff-target is up to date.
Changes applied before test
commit 035c34911170ae9766287f4e40c9815134cc0a54
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Feb 2 15:56:18 2022 +0100

    Update for swh.core 2.0.0
    
    - Add expected entry points for swh.core 2 db handling new features:
    
      - add a ``swh.storge.get_datastore()`` function
      - add ``swh.storage.postgreql.storage.Storage.get_current_version()`` method
      - move sql migration scripts in ``swh/storage/sql/upgrades``
      - modify sql initialization scripts to match swh.core 2 (remove
        dbversion management code).
    
    - Update tests to use the new template-based database handling; this
      should have only minimal impact on test execution performances.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 11 2022, 4:20 PM
Harbormaster failed remote builds in B26830: Diff 25954!
douardda retitled this revision from Update for swh.core 2.0.0 to Update storage for swh.core 2.0.0.Feb 11 2022, 5:13 PM

Build is green

Patch application report for D7160 (id=25954)

Rebasing onto f578377db5...

Current branch diff-target is up to date.
Changes applied before test
commit 035c34911170ae9766287f4e40c9815134cc0a54
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Feb 2 15:56:18 2022 +0100

    Update for swh.core 2.0.0
    
    - Add expected entry points for swh.core 2 db handling new features:
    
      - add a ``swh.storge.get_datastore()`` function
      - add ``swh.storage.postgreql.storage.Storage.get_current_version()`` method
      - move sql migration scripts in ``swh/storage/sql/upgrades``
      - modify sql initialization scripts to match swh.core 2 (remove
        dbversion management code).
    
    - Update tests to use the new template-based database handling; this
      should have only minimal impact on test execution performances.

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

This revision is now accepted and ready to land.Feb 23 2022, 6:18 PM

Add types-toml to requirements-test.txt (in a dedicated revision)

This revision was landed with ongoing or failed builds.Feb 24 2022, 11:14 AM
This revision was automatically updated to reflect the committed changes.

Build has FAILED

Patch application report for D7160 (id=26232)

Rebasing onto f578377db5...

Current branch diff-target is up to date.
Changes applied before test
commit 215162b2c12962803188220f4bef8bcfd710905a
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Feb 2 15:56:18 2022 +0100

    Update for swh.core 2.0.0
    
    - Add expected entry points for swh.core 2 db handling new features:
    
      - add a ``swh.storge.get_datastore()`` function
      - add ``swh.storage.postgreql.storage.Storage.get_current_version()`` method
      - move sql migration scripts in ``swh/storage/sql/upgrades``
      - modify sql initialization scripts to match swh.core 2 (remove
        dbversion management code).
    
    - Update tests to use the new template-based database handling; this
      should have only minimal impact on test execution performances.

commit 386fb4d61f190dfd90d0af30735f060c6dc4732e
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Feb 24 11:00:49 2022 +0100

    Add types-toml to requirements-test.txt

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