- add a JournalWriterInterface in a new interface.py module,
- add a flush() method to this interface,
- remove (now unused) write_update methods,
- move all type-related code in this module,
- fix InMemoryJournalWriter type annotations.
- remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
Details
Diff Detail
- Repository
- rDJNL Journal infrastructure
- Branch
- master
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 29735 Build 46475: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 46474: arc lint + arc unit
Time | Test | |
---|---|---|
1 ms | Jenkins > .tox.py3.lib.python3.7.site-packages.swh.journal.tests.test_inmemory::test_write_addition_errors_without_unique_key def test_write_addition_errors_without_unique_key():
> writer = InMemoryJournalWriter[BaseModel](
value_sanitizer=model_object_dict_sanitizer
| |
1 ms | Jenkins > .tox.py3.lib.python3.7.site-packages.swh.journal.tests.test_inmemory::test_write_additions_with_test_objects def test_write_additions_with_test_objects():
> writer = InMemoryJournalWriter[BaseModel](
value_sanitizer=model_object_dict_sanitizer
| |
4 ms | Jenkins > .tox.py3.lib.python3.7.site-packages.swh.journal.pytest_plugin::swh.journal.pytest_plugin.ensure_lists | |
5,169 ms | Jenkins > .tox.py3.lib.python3.7.site-packages.swh.journal.tests.test_client::test_client | |
5,664 ms | Jenkins > .tox.py3.lib.python3.7.site-packages.swh.journal.tests.test_client::test_client_batch_size[100] | |
View Full Test Results (2 Failed · 49 Passed) |
Event Timeline
Build has FAILED
Patch application report for D7952 (id=28637)
Rebasing onto d1b7ad5d9d...
Current branch diff-target is up to date.
Changes applied before test
commit 52398ad80336a3d850ca8e7264b4ce20d5c34d89 Author: David Douard <david.douard@sdfa3.org> Date: Thu Jun 2 17:17:39 2022 +0200 Add type annotation for JournalWriter related code - add a JournalWriterInterface in a new interface.py module, - add a flush() method to this interface, - remove (now unused) write_update methods, - move all type-related code in this module, - fix InMemoryJournalWriter type annotations. commit db9d20294153430aad0975ecb67d50732fbf7699 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jun 3 09:46:16 2022 +0200 Remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
Link to build: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/209/
See console output for more information: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/209/console
Build is green
Patch application report for D7952 (id=28639)
Rebasing onto d1b7ad5d9d...
Current branch diff-target is up to date.
Changes applied before test
commit 5b91758fd5f7691946d73fa93e0f4e7123cba2a0 Author: David Douard <david.douard@sdfa3.org> Date: Thu Jun 2 17:17:39 2022 +0200 Add type annotation for JournalWriter related code - add a JournalWriterInterface in a new interface.py module, - add a flush() method to this interface, - remove (now unused) write_update methods, - move all type-related code in this module, - fix InMemoryJournalWriter type annotations. commit 908f015465a3bcd20b0701e7ec80ca4d5cb0b223 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jun 3 09:46:16 2022 +0200 Remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
See https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/211/ for more details.
I think I would rather keep the TypeVar definition in each module that needs it (assume it is still actually needed).
It is a Python quirk that type variables can be imported; other languages normally scope them to a class or function declaration.
swh/journal/writer/interface.py | ||
---|---|---|
31–37 | no need for the typevar here; they could only be useful if you needed to parametrize the whole class, or express that the return value has the same type as the argument |
Build has FAILED
Patch application report for D7952 (id=28649)
Rebasing onto d1b7ad5d9d...
Current branch diff-target is up to date.
Changes applied before test
commit 2d2c6a7dc487e2a7741a7a7652225fcf90d6d7f9 Author: David Douard <david.douard@sdfa3.org> Date: Thu Jun 2 17:17:39 2022 +0200 Add type annotation for JournalWriter related code - add a JournalWriterInterface in a new interface.py module, - add a flush() method to this interface, - remove (now unused) write_update methods, - move all type-related code in this module, - fix InMemoryJournalWriter type annotations, - remove usage of the TValue TypeVar in favor of using ValueProtocol directly. foldme commit 908f015465a3bcd20b0701e7ec80ca4d5cb0b223 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jun 3 09:46:16 2022 +0200 Remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
Link to build: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/213/
See console output for more information: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/213/console
Build has FAILED
Patch application report for D7952 (id=28652)
Rebasing onto d1b7ad5d9d...
Current branch diff-target is up to date.
Changes applied before test
commit 2d2c6a7dc487e2a7741a7a7652225fcf90d6d7f9 Author: David Douard <david.douard@sdfa3.org> Date: Thu Jun 2 17:17:39 2022 +0200 Add type annotation for JournalWriter related code - add a JournalWriterInterface in a new interface.py module, - add a flush() method to this interface, - remove (now unused) write_update methods, - move all type-related code in this module, - fix InMemoryJournalWriter type annotations, - remove usage of the TValue TypeVar in favor of using ValueProtocol directly. foldme commit 908f015465a3bcd20b0701e7ec80ca4d5cb0b223 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jun 3 09:46:16 2022 +0200 Remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
Link to build: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/215/
See console output for more information: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/215/console
Build is green
Patch application report for D7952 (id=28654)
Rebasing onto d1b7ad5d9d...
Current branch diff-target is up to date.
Changes applied before test
commit 903f8e601aacaaf2d9326a4d7e2595ed3098913c Author: David Douard <david.douard@sdfa3.org> Date: Thu Jun 2 17:17:39 2022 +0200 Add type annotation for JournalWriter related code - add a JournalWriterInterface in a new interface.py module, - add a flush() method to this interface, - remove (now unused) write_update methods, - move all type-related code in this module, - fix InMemoryJournalWriter type annotations, - remove usage of the TValue TypeVar in favor of using ValueProtocol directly. commit 908f015465a3bcd20b0701e7ec80ca4d5cb0b223 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jun 3 09:46:16 2022 +0200 Remove unused 'privileged' argument from journal writer's write_addition(s) for StreamJournalWriter and InMemoryJournalWriter, and make them consistent with KafkaJournalWriter.
See https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/217/ for more details.