To avoid SQL errors.
Details
- Reviewers
douardda - Group Reviewers
Reviewers - Commits
- rDCIDX3c6a446dd069: Add checks in the idx_storage that the same content/rev/orig is not present…
Diff Detail
- Repository
- rDCIDX Metadata indexer
- Branch
- storage-duplicate
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4114 Build 5417: tox-on-jenkins Jenkins Build 5416: arc lint + arc unit
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/315/ for more details.
This lacks a unit test: just add a test for the new method. It's nice to also have the test for the revision_metadata_add() call, but there should be a test that ensure the _check_duplicates() behaves ok (once again, with valid and invalid inputs), and ensure the newly added validator works in every modified method. I count 7 of them patched (plus the hunk in in_memory.py). I would expect (functionally) 8 tests.
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/357/ for more details.
This lacks a unit test: just add a test for the new method.
Done.
and ensure the newly added validator works in every modified method. I count 7 of them patched
Done in D1095 for 5 of them. The 2 other ones will come in a later Diff (because these endpoints behave differently)
(plus the hunk in in_memory.py).
It's already tested by the tests in test_storage.py (which are run three times each: pg storage, memory storage, and client api).
Done in D1095 for 5 of them. The 2 other ones will come in a later Diff (because these endpoints behave differently)
I'm not a fan of adding missing pieces of a diff in another one.
Those tests are missing here, not in 1095.
I understand the need for refactoring but we should strive to keep the perimeter of a diff sandboxed.
Let 1095 be a tests refactoring and not 'a tests refactoring + a bug fix + adding missing tests'.
I don't want to write non-trivial code that will get deleted in the next diff anyway.
I understand the need for refactoring but we should strive to keep the perimeter of a diff sandboxed.
Let 1095 be a tests refactoring and not 'a tests refactoring + a bug fix + adding missing tests'.I don't want to write non-trivial code that will get deleted in the next diff anyway.
There could be a middle ground somewhere though.
You could have started by the refactoring first.
Then a diff to add this diff (and the 5 missing tests easier to add a priori with 1095)
Then the bugfix 1095 includes as another diff.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/359/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/359/console
swh/indexer/storage/__init__.py | ||
---|---|---|
51–79 | I'm still quite not happy with this for several reasons:
|
- Remove doc about psycopg error.
- s/column/key/g
- Document that values must be hashable.
swh/indexer/storage/__init__.py | ||
---|---|---|
51–79 |
Indeed, fixed.
It's in the module that implements the pg backend and its name is prefixed with _, so it's unlikely to be used anywhere else. Fixed anyway.
There's the doctest
Indeed, fixed. |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/378/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/378/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/379/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/379/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/385/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/385/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/388/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/388/console