Page MenuHomeSoftware Heritage

Make db_transaction's client_options configurable at run time
ClosedPublic

Authored by douardda on Mar 30 2022, 2:36 PM.

Details

Summary

allowing these to be easily set from a config file.

Event Timeline

Build is green

Patch application report for D7472 (id=27109)

Rebasing onto 06ad659636...

Current branch diff-target is up to date.
Changes applied before test
commit 679de53dec4bb457e8b2c60a60ce94f4c6f57415
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Mar 30 14:33:27 2022 +0200

    Make db_transaction's client_options configurable at run time
    
    allowing these to be easily set from a config file.

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

vlorentz added inline comments.
swh/core/db/common.py
38–48

You should use double backticks

swh/core/db/tests/test_db.py
363–411

you can remove the tests below with parameterization like this

swh/core/db/common.py
38–48

one day I will think about this beforehand...

swh/core/db/tests/test_db.py
363–411

why not

Merge all 4 added tests in a single paramtrized one

Build is green

Patch application report for D7472 (id=27113)

Rebasing onto 06ad659636...

Current branch diff-target is up to date.
Changes applied before test
commit a2136a2ecdd50e45c6c9ce9cd7582546153df035
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Mar 30 14:33:27 2022 +0200

    Make db_transaction's client_options configurable at run time
    
    allowing these to be easily set from a config file.

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

Build is green

Patch application report for D7472 (id=27114)

Rebasing onto 06ad659636...

Current branch diff-target is up to date.
Changes applied before test
commit 2a2615357b0719a9d000f0ccfde67e1767dc296b
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Mar 30 14:33:27 2022 +0200

    Make db_transaction's client_options configurable at run time
    
    allowing these to be easily set from a config file.

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

olasd added a subscriber: olasd.

The duplication between db_transaction and db_transaction_generator looks a bit silly, but I'm not sure there's much to do about it, so this lgtm, thanks.

This revision is now accepted and ready to land.Apr 4 2022, 3:35 PM
In D7472#195801, @olasd wrote:

The duplication between db_transaction and db_transaction_generator looks a bit silly, but I'm not sure there's much to do about it, so this lgtm, thanks.

yes I stared at this for some time, then went 'meh'