Page MenuHomeSoftware Heritage

Adapt vault to swh-core 2.0.0
ClosedPublic

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

Details

Summary
  • add the get_datastore function in swh.vault
  • add the get_current_version method in VaultBackend,
  • remove dbversion management from sql init script
  • update tests accordingly

Depends on D7161
Related to T3894

Event Timeline

Build has FAILED

Patch application report for D7162 (id=25960)

Could not rebase; Attempt merge onto 9d2a46ed06...

Updating 9d2a46e..833dc35
Fast-forward
 swh/vault/__init__.py          |  9 +++++++--
 swh/vault/backend.py           |  2 ++
 swh/vault/sql/30-schema.sql    | 10 ----------
 swh/vault/tests/conftest.py    | 27 +++++++++++++++++++--------
 swh/vault/tests/test_server.py |  2 ++
 5 files changed, 30 insertions(+), 20 deletions(-)
Changes applied before test
commit 833dc351d019efbc1f60f290248aab1978010629
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

commit 88bdab84f62d6e106bf26afe8e1e8beff327f2e7
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Feb 10 19:40:03 2022 +0100

    Ensure the vault instance used in tests is recreated
    
    otherwise XXX

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 11 2022, 4:40 PM
Harbormaster failed remote builds in B26836: Diff 25960!

Build has FAILED

Patch application report for D7162 (id=25962)

Could not rebase; Attempt merge onto 9d2a46ed06...

Updating 9d2a46e..6630472
Fast-forward
 swh/vault/__init__.py          |  9 +++++++--
 swh/vault/backend.py           |  2 ++
 swh/vault/sql/30-schema.sql    | 10 ----------
 swh/vault/tests/conftest.py    | 27 +++++++++++++++++++--------
 swh/vault/tests/test_server.py |  2 ++
 5 files changed, 30 insertions(+), 20 deletions(-)
Changes applied before test
commit 6630472ae79e41a6af1cf557dd5ca5dd4e86108f
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

commit 88bdab84f62d6e106bf26afe8e1e8beff327f2e7
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Feb 10 19:40:03 2022 +0100

    Ensure the vault instance used in tests is recreated
    
    otherwise XXX

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 11 2022, 4:44 PM
Harbormaster failed remote builds in B26838: Diff 25962!

forgot to move migration scripts

Build has FAILED

Patch application report for D7162 (id=25965)

Could not rebase; Attempt merge onto 9d2a46ed06...

Updating 9d2a46e..d37b73b
Fast-forward
 swh/vault/__init__.py                   |  9 +++++++--
 swh/vault/backend.py                    |  2 ++
 swh/vault/sql/30-schema.sql             | 10 ----------
 {sql => swh/vault/sql}/upgrades/002.sql |  0
 {sql => swh/vault/sql}/upgrades/003.sql |  0
 swh/vault/tests/conftest.py             | 27 +++++++++++++++++++--------
 swh/vault/tests/test_server.py          |  2 ++
 7 files changed, 30 insertions(+), 20 deletions(-)
 rename {sql => swh/vault/sql}/upgrades/002.sql (100%)
 rename {sql => swh/vault/sql}/upgrades/003.sql (100%)
Changes applied before test
commit d37b73b12128408234dabdcb170e379bab0feeb6
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

commit 88bdab84f62d6e106bf26afe8e1e8beff327f2e7
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Feb 10 19:40:03 2022 +0100

    Ensure the vault instance used in tests is recreated
    
    otherwise XXX

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 11 2022, 4:56 PM
Harbormaster failed remote builds in B26841: Diff 25965!
douardda retitled this revision from Adapt to swh-core 2.0.0 to Adapt vault to swh-core 2.0.0.

Build has FAILED

Patch application report for D7162 (id=25977)

Could not rebase; Attempt merge onto 9d2a46ed06...

Updating 9d2a46e..2e41370
Fast-forward
 swh/vault/__init__.py                   |  9 +++++++--
 swh/vault/backend.py                    |  2 ++
 swh/vault/sql/30-schema.sql             | 10 ----------
 {sql => swh/vault/sql}/upgrades/002.sql |  0
 {sql => swh/vault/sql}/upgrades/003.sql |  0
 swh/vault/tests/conftest.py             | 27 +++++++++++++++++++--------
 swh/vault/tests/test_server.py          |  4 ++++
 7 files changed, 32 insertions(+), 20 deletions(-)
 rename {sql => swh/vault/sql}/upgrades/002.sql (100%)
 rename {sql => swh/vault/sql}/upgrades/003.sql (100%)
Changes applied before test
commit 2e41370329c12dcc382a95b528b19f473478e4ef
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

commit dccc245a01aef621a7439dc392f56a5a646c4764
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Feb 10 19:40:03 2022 +0100

    Ensure the vault instance used in tests is recreated
    
    otherwise XXX

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 14 2022, 12:19 PM
Harbormaster failed remote builds in B26851: Diff 25977!

Build is green

Patch application report for D7162 (id=25977)

Rebasing onto dccc245a01...

Current branch diff-target is up to date.
Changes applied before test
commit 2e41370329c12dcc382a95b528b19f473478e4ef
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

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

This revision is now accepted and ready to land.Feb 23 2022, 11:37 AM
ardumont added inline comments.
swh/vault/backend.py
70

So now, we only have to migrate that version number when migrating pg schema, right?

swh/vault/backend.py
70

So now, we only have to migrate that version number when migrating pg schema, right?

yes (and add a nnn.sql migration script).

bump dependency to swh.core 2

Build has FAILED

Patch application report for D7162 (id=26240)

Rebasing onto dccc245a01...

Current branch diff-target is up to date.
Changes applied before test
commit e4c9935c14889ee5fce387dfa6956c047c418b2d
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

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

Build is green

Patch application report for D7162 (id=26240)

Rebasing onto dccc245a01...

Current branch diff-target is up to date.
Changes applied before test
commit e4c9935c14889ee5fce387dfa6956c047c418b2d
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

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

Build is green

Patch application report for D7162 (id=26240)

Rebasing onto dccc245a01...

Current branch diff-target is up to date.
Changes applied before test
commit e4c9935c14889ee5fce387dfa6956c047c418b2d
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Feb 7 13:33:02 2022 +0100

    Adapt to swh-core 2.0.0
    
    - add the `get_datastore` function in `swh.vault`
    - add the `get_current_version` method in `VaultBackend`,
    - remove dbversion management from sql init script
    - update tests accordingly

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

This revision was automatically updated to reflect the committed changes.