Depends on D3394.
Details
Details
- Reviewers
vlorentz - Group Reviewers
Reviewers - Commits
- rDCOREce1e4523834b: Add type annotations for swh.core.db.BaseDb
mypy
Diff Detail
Diff Detail
- Repository
- rDCORE Foundations and core functionalities
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13270 Build 20267: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 20266: arc lint + arc unit
Event Timeline
Comment Actions
Build is green
Patch application report for D3398 (id=12049)
Could not rebase; Attempt merge onto 3a612cca29...
Updating 3a612cc..ce1e452 Fast-forward requirements-test-db.txt | 1 + swh/core/db/__init__.py | 175 ++++++++++++++++++++------- swh/core/db/tests/test_db.py | 282 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 377 insertions(+), 81 deletions(-)
Changes applied before test
commit ce1e4523834b3849813a3800494ebbda515cf760 Author: Nicolas Dandrimont <nicolas@dandrimont.eu> Date: Fri Jul 3 01:21:04 2020 +0200 Add type annotations for swh.core.db.BaseDb commit 7124063e497a30b181b7b85dae4b61f9e4fe5120 Author: Nicolas Dandrimont <nicolas@dandrimont.eu> Date: Thu Jul 2 13:30:33 2020 +0200 Reimplement PostgreSQL COPY escaping from first principles Instead of the brittle csv we used to use, use postgresql text mode to transfer data in the `copy` operation. Reference all relevant bits of the PostgreSQL documentation inline with the code. This also adds test coverage for most supported types, as well as making sure all escaping corner cases are covered.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/17/ for more details.