Page MenuHomeSoftware Heritage

Make `swh db init` retrieve the db cnx uri from the config file
ClosedPublic

Authored by douardda on Feb 2 2022, 1:49 PM.

Diff Detail

Repository
rDCORE Foundations and core functionalities
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 D7061 (id=25611)

Could not rebase; Attempt merge onto aba5c80765...

Updating aba5c80..4f41cc9
Fast-forward
 MANIFEST.in                 |   1 -
 swh/core/cli/db.py          | 183 +++++++-------------------------------------
 swh/core/db/db_utils.py     | 179 ++++++++++++++++++++++++++++++++++++++++---
 swh/core/sql/log-schema.sql |  33 --------
 4 files changed, 195 insertions(+), 201 deletions(-)
 mode change 100755 => 100644 swh/core/cli/db.py
 delete mode 100644 swh/core/sql/log-schema.sql
Changes applied before test
commit 4f41cc905d805953363688316a088bc84100e181
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:54:39 2022 +0100

    Make `swh db init` retrieve the db cnx uri from the config file

commit 6c665e38e6579a02839eef6a8a6b60dc332be51c
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:49:41 2022 +0100

    Move utility functions from cli.db to db.db_utils

commit e4117fcf51a256c5b708f909c818f452c794c0f8
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 10:07:35 2022 +0100

    Remove the old and unused log-schema.sql file

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 2 2022, 1:51 PM
Harbormaster failed remote builds in B26441: Diff 25611!

Build is green

Patch application report for D7061 (id=25618)

Could not rebase; Attempt merge onto aba5c80765...

Updating aba5c80..5c5b981
Fast-forward
 MANIFEST.in                   |   1 -
 swh/core/cli/db.py            | 183 +++++++-----------------------------------
 swh/core/db/db_utils.py       | 177 +++++++++++++++++++++++++++++++++++++---
 swh/core/db/tests/test_cli.py |   2 +-
 swh/core/sql/log-schema.sql   |  33 --------
 5 files changed, 194 insertions(+), 202 deletions(-)
 mode change 100755 => 100644 swh/core/cli/db.py
 delete mode 100644 swh/core/sql/log-schema.sql
Changes applied before test
commit 5c5b981020c4b3e38f89f112480b7297cceded5c
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:54:39 2022 +0100

    Make `swh db init` retrieve the db cnx uri from the config file

commit d3b7b081fd3eda460d11d1d6d70f2b52fa3e0ef3
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:49:41 2022 +0100

    Move utility functions from cli.db to db.db_utils

commit e4117fcf51a256c5b708f909c818f452c794c0f8
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 10:07:35 2022 +0100

    Remove the old and unused log-schema.sql file

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

vlorentz added inline comments.
swh/core/cli/db.py
165–166

could you document this in the CLI help?

Build is green

Patch application report for D7061 (id=25633)

Could not rebase; Attempt merge onto aba5c80765...

Updating aba5c80..36bc182
Fast-forward
 MANIFEST.in                   |   1 -
 swh/core/cli/db.py            | 183 +++++++-----------------------------------
 swh/core/db/db_utils.py       | 174 ++++++++++++++++++++++++++++++++++++---
 swh/core/db/tests/test_cli.py |   2 +-
 swh/core/sql/log-schema.sql   |  33 --------
 5 files changed, 191 insertions(+), 202 deletions(-)
 mode change 100755 => 100644 swh/core/cli/db.py
 delete mode 100644 swh/core/sql/log-schema.sql
Changes applied before test
commit 36bc18267c911abb85b6a1cfc3321942e0359369
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:54:39 2022 +0100

    Make `swh db init` retrieve the db cnx uri from the config file

commit de1c894e3fa88b3e1e2ba1e7c7dbfc77f7ea4b51
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:49:41 2022 +0100

    Move utility functions from cli.db to db.db_utils

commit e4117fcf51a256c5b708f909c818f452c794c0f8
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 10:07:35 2022 +0100

    Remove the old and unused log-schema.sql file

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

improve help for 'swh db init' as suggested by vlorentz

Build is green

Patch application report for D7061 (id=25637)

Could not rebase; Attempt merge onto aba5c80765...

Updating aba5c80..b11933f
Fast-forward
 MANIFEST.in                   |   1 -
 swh/core/cli/db.py            | 208 +++++++++---------------------------------
 swh/core/db/db_utils.py       | 174 ++++++++++++++++++++++++++++++++---
 swh/core/db/tests/test_cli.py |   2 +-
 swh/core/sql/log-schema.sql   |  33 -------
 5 files changed, 206 insertions(+), 212 deletions(-)
 delete mode 100644 swh/core/sql/log-schema.sql
Changes applied before test
commit b11933f997e32db1b59be095a4dfe5d0c3be912b
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:54:39 2022 +0100

    Make `swh db init` retrieve the db cnx uri from the config file

commit de1c894e3fa88b3e1e2ba1e7c7dbfc77f7ea4b51
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:49:41 2022 +0100

    Move utility functions from cli.db to db.db_utils

commit e4117fcf51a256c5b708f909c818f452c794c0f8
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 10:07:35 2022 +0100

    Remove the old and unused log-schema.sql file

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

ardumont requested changes to this revision.Feb 2 2022, 4:23 PM
ardumont added a subscriber: ardumont.

for the sake of the missing import (or definition).

swh/core/cli/db.py
168

where does this function come from? (i don't see the import nor definition about it in the module file).

This revision now requires changes to proceed.Feb 2 2022, 4:23 PM
swh/core/cli/db.py
168

it's at the bottom of the file

for the sake of the missing import (or definition).

Ah i see the definition in the other diff D7062...
so you have an issue in your commits ;)

ardumont added inline comments.
swh/core/cli/db.py
168

my bad then!
I opened the top of the file ;)

This revision is now accepted and ready to land.Feb 2 2022, 4:25 PM

Build is green

Patch application report for D7061 (id=25929)

Could not rebase; Attempt merge onto 5046a95f05...

Updating 5046a95..3e43730
Fast-forward
 MANIFEST.in                   |   1 -
 swh/core/cli/db.py            | 208 +++++++++---------------------------------
 swh/core/db/db_utils.py       | 174 ++++++++++++++++++++++++++++++++---
 swh/core/db/tests/test_cli.py |   2 +-
 swh/core/sql/log-schema.sql   |  33 -------
 5 files changed, 206 insertions(+), 212 deletions(-)
 delete mode 100644 swh/core/sql/log-schema.sql
Changes applied before test
commit 3e43730df6150168ca99cb083bd2e60feb4a2771
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:54:39 2022 +0100

    Make `swh db init` retrieve the db cnx uri from the config file

commit 459da96c1e6b6044deb874e0e668606c3da3e43c
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 14:49:41 2022 +0100

    Move utility functions from cli.db to db.db_utils

commit 932eed4863baedf011b4a59d0227331d37db1dfd
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 28 10:07:35 2022 +0100

    Remove the old and unused log-schema.sql file

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