6a53cb3 | Valentin Lorentz | 19 August 2020, 12:25:22 UTC | pg: Check revision.extra_headers is not null. Fixes a regression in 038a219f84d6b8a4f02b48f9ad3c5d823d097790, as it made the converter expect a list. When adding this column, we made it default to null instead of defaulting to an empty array, so existing records were initialized will null. This commit migrates these nulls to empty arrays, then adds a constraint to enforce it in the future. | 19 August 2020, 12:57:26 UTC |
ca3ee92 | Valentin Lorentz | 19 August 2020, 12:23:54 UTC | converters: convert extra_headers to an empty list if it is None. | 19 August 2020, 12:57:23 UTC |
e2b1494 | Valentin Lorentz | 19 August 2020, 10:40:01 UTC | pg: Make date_neg_utc_offset is not null if date is not null. Fixes a regression in 038a219f84d6b8a4f02b48f9ad3c5d823d097790, as it made converters expect a boolean. We stopped writing this kind of nulls since we started using model objects for insertions, but didn't migrate existing data. This commit migrates these nulls to false, then adds a constraint to enforce it in the future. | 19 August 2020, 12:57:21 UTC |
7dcd570 | Valentin Lorentz | 19 August 2020, 12:06:21 UTC | converters: convert neg_utc_offset to False if it is None. | 19 August 2020, 12:57:18 UTC |
e2f0665 | Valentin Lorentz | 19 August 2020, 12:54:45 UTC | backfiller: Add missing 'extra_header' field. This field wasn't backfilled; and it wasn't caught by tests, because revisions in swh.journal.tests.journal_data.TEST_OBJECTS were had an empty extra_header field. Starting with swh-journal v0.4.3, one of the revisions in TEST_OBJECTS has a non-empty extra_header field, so it will become a test failure without this commit | 19 August 2020, 12:55:22 UTC |
bd92547 | Valentin Lorentz | 17 August 2020, 08:45:59 UTC | backfiller: remove convertion of model objects back to dicts. As a temporary workaround to remain compatible with existing backfiller converters, I made them convert back to dict before they are converted again to model objects. This commit removes this workaround by making converters return model objects. | 17 August 2020, 08:45:59 UTC |
038a219 | Valentin Lorentz | 12 August 2020, 08:55:06 UTC | converters: Work on model objects instead of dicts on the "not-db" side. This is a change internal to the pg storage, that will be needed to make revision_get, revision_log, and release_get return model objects. | 17 August 2020, 08:25:42 UTC |
89656c9 | Valentin Lorentz | 17 August 2020, 07:45:09 UTC | test_converters: Fix test data to match actual values. | 17 August 2020, 07:52:10 UTC |
3a713dd | Valentin Lorentz | 13 August 2020, 15:04:18 UTC | cassandra.cql: Use a dict of statements instead of dynamically building method names in the two methods which need to switch between statements. The method name building was done to shoehorn this statement switching into the existing @_prepared_select_statement. This introduces @_prepared_select_statements (plural), which does this switching properly, using a dictionary. | 14 August 2020, 14:35:09 UTC |
546d11e | Valentin Lorentz | 13 August 2020, 14:52:28 UTC | cassandra.cql: Make the 'limit' argument of origin_visit_get non-optional. It's not optional in the storage interface, so a None value can't be passed. | 14 August 2020, 14:35:09 UTC |
1996b49 | Valentin Lorentz | 13 August 2020, 09:06:14 UTC | in_memory: Remove dead code. | 14 August 2020, 14:35:09 UTC |
291704d | Valentin Lorentz | 12 August 2020, 15:41:43 UTC | in_memory: Remove InMemoryStorage.*metadata_* and implement InMemoryCqlRunner.*metadata_* | 14 August 2020, 14:35:09 UTC |
da35e56 | Valentin Lorentz | 12 August 2020, 15:26:03 UTC | in_memory: Remove InMemoryStorage.origin_visit_* and implement InMemoryCqlRunner.origin_visit_* | 14 August 2020, 14:35:09 UTC |
e5f450c | Valentin Lorentz | 12 August 2020, 15:24:58 UTC | cassandra.cql: reorder origin_visit_* and origin_visit_status_* methods to be properly grouped. | 14 August 2020, 14:35:09 UTC |
249e4af | Valentin Lorentz | 12 August 2020, 15:23:55 UTC | Remove unused arguments of CqlRunner.origin_visit_status_get. | 14 August 2020, 14:35:09 UTC |
e1eb6cd | Valentin Lorentz | 12 August 2020, 14:45:17 UTC | in_memory: Remove InMemoryStorage.origin_* and implement InMemoryCqlRunner.origin_* | 14 August 2020, 14:35:09 UTC |
f78c76f | Valentin Lorentz | 12 August 2020, 14:21:01 UTC | in_memory: Remove InMemoryStorage.snapshot_* and implement InMemoryCqlRunner.snapshot_* | 14 August 2020, 14:35:08 UTC |
6651130 | Valentin Lorentz | 12 August 2020, 13:38:14 UTC | Remove endpoint snapshot_get_by_origin_visit. It's not used anywhere. | 14 August 2020, 14:34:55 UTC |
1104c53 | Valentin Lorentz | 12 August 2020, 13:27:15 UTC | in_memory: Remove InMemoryStorage.release_* and implement InMemoryCqlRunner.release_* | 14 August 2020, 14:34:55 UTC |
237c400 | Valentin Lorentz | 12 August 2020, 13:23:40 UTC | in_memory: Remove InMemoryStorage.revision_* and implement InMemoryCqlRunner.revision_* | 14 August 2020, 13:16:29 UTC |
8e7eed4 | Valentin Lorentz | 12 August 2020, 12:40:20 UTC | in_memory: Remove InMemoryStorage.directory_* and implement InMemoryCqlRunner.directory_* | 14 August 2020, 13:16:29 UTC |
d5f41f8 | Valentin Lorentz | 12 August 2020, 12:01:22 UTC | in_memory: Remove InMemoryStorage.skipped_content_* and implement InMemoryCqlRunner.skipped_content_* | 14 August 2020, 13:16:29 UTC |
b3af39a | Valentin Lorentz | 12 August 2020, 11:54:32 UTC | in_memory: Remove InMemoryStorage.content_* and implement InMemoryCqlRunner.content_* | 14 August 2020, 13:16:29 UTC |
397a645 | Valentin Lorentz | 12 August 2020, 11:44:50 UTC | in_memory: make object_find_by_sha1_git merge results from the CassandraStorage. For now this has no effect. However, in the near future, the CassandraStorage will be in charge of some object types, so we need to merge objects found in the CassandraStorage and those found directly in the InMemoryStorage. | 14 August 2020, 13:16:29 UTC |
a96c253 | Valentin Lorentz | 12 August 2020, 11:41:42 UTC | in_memory: Add InMemoryCqlRunner, a class that emulates cassandra.cql.CqlRunner without Cassandra. For now it's only used for object counters; but future commits will progressively move the in-memory's storage features to it. | 14 August 2020, 13:16:29 UTC |
bc47283 | Valentin Lorentz | 12 August 2020, 11:34:30 UTC | Make InMemoryStorage inherit from CassandraStorage. This has no effect for now, other than deduplicating a method and causing a name clash. | 14 August 2020, 13:16:29 UTC |
2097186 | Valentin Lorentz | 12 August 2020, 11:24:33 UTC | in_memory: Add class Table, which emulates a Cassandra table. It will be used to implement the in-memory storage as a backend for the cassandra storage. | 14 August 2020, 13:16:29 UTC |
ef06005 | Valentin Lorentz | 12 August 2020, 11:16:44 UTC | cassandra.cql: Fix return type of stat_counters. | 14 August 2020, 13:16:29 UTC |
1266b6a | Valentin Lorentz | 12 August 2020, 11:16:13 UTC | cassandra.model: Add PARTITION_KEY and CLUSTERING_KEY to the model classes. They will be used by the in-mem implementation of CqlRunner. | 14 August 2020, 13:16:29 UTC |
3dc69aa | Valentin Lorentz | 12 August 2020, 18:25:23 UTC | cassandra: Make origin_visit_get_latest filter using any status of a visit, instead of just the last. This fixes a mismatch in behavior with the pg and the in-mem storages | 14 August 2020, 13:16:29 UTC |
006eeec | Valentin Lorentz | 12 August 2020, 17:08:17 UTC | cassandra: Fix wrong algo reported in HashCollision, because of variable shadowing. | 14 August 2020, 13:16:29 UTC |
da28731 | Valentin Lorentz | 14 August 2020, 13:15:54 UTC | cassandra: Fix content_missing_per_sha1 when its parameter has length != 1. | 14 August 2020, 13:16:29 UTC |
6675286 | Valentin Lorentz | 11 August 2020, 10:22:09 UTC | cassandra.cql: Explicitly request columns, instead of 'SELECT *'. 'SELECT *' should be avoided in prepared statements, see https://docs.datastax.com/en/developer/java-driver/3.0/manual/statements/prepared/#avoid-preparing-select-queries | 11 August 2020, 10:22:15 UTC |
0b78b39 | Valentin Lorentz | 11 August 2020, 09:37:13 UTC | cassandra: add a TABLE class attribute to row classes, and use it to deduplicate prepared statements logic. It will also be used in a future commit to generate 'select' prepared statements. | 11 August 2020, 09:37:13 UTC |
92e7a21 | Valentin Lorentz | 10 August 2020, 19:46:27 UTC | cassandra: Add annotations to make mypy actually type-check calls to CqlRunner. All methods of CqlRunner were decorated, which prevented mypy from doing anything useful. As I finally found a way to type the decorator (using mypy_extensions.NamedArg), I can finally make mypy aware of the methods' types. This commit (as well as all three of the last commits) also fixes issues found by mypy thanks to this. | 11 August 2020, 09:19:57 UTC |
b11b890 | Valentin Lorentz | 10 August 2020, 19:42:59 UTC | cassandra.storage: remove dead code | 11 August 2020, 09:13:55 UTC |
f954714 | Valentin Lorentz | 10 August 2020, 19:36:41 UTC | Fix type of snapshot_count_branches. | 11 August 2020, 09:13:30 UTC |
319de05 | Valentin Lorentz | 10 August 2020, 19:33:00 UTC | cassandra.cql: Use static dataclasses instead of generating namedtuples on the fly. Before this commit, python-cassandra used the default row factory, which creates anonymous named tuple on each query, which makes it impossible to type CqlRunner properly. This commit replaces the row factory with dict_factory, which creates only dicts, and converts them to well-defined dataclasses. Additionally, this stop leaking python-cassandra internals to cassandra.storage. This also has some great side-effects: * methods of CqlRunner are now consistent with each other (eg. _add_one methods used to be a mix of objects, dictionaries, and taking each value as argument) * it will allow me to deduplicate more codes in further commits (I already deduplicated insertions methods to use self._add_one, as it was meant on the initial write of this class) * CqlRunner no longer needs to define lists with column names, they are automatically detected from the dataclasses | 10 August 2020, 19:48:37 UTC |
7d332f5 | Valentin Lorentz | 10 August 2020, 08:59:21 UTC | algos/snapshot.py: add types. | 10 August 2020, 08:59:21 UTC |
bdd2f4a | Valentin Lorentz | 07 August 2020, 19:46:29 UTC | pg: Fix crash in snapshot_get when the snapshot does not exist. Reviewers: #reviewers Differential Revision: https://forge.softwareheritage.org/D3743 | 07 August 2020, 19:46:39 UTC |
4918759 | Valentin Lorentz | 07 August 2020, 12:04:37 UTC | Make snapshot_get_branches return a TypedDict containing SnapshotBranch objects. Instead of untyped dictionaries. This makes snapshot_get longer and duplicates its code across backends; but snapshot_get should be removed soon. Related: T645 | 07 August 2020, 13:51:26 UTC |
d9ff391 | Antoine R. Dumont (@ardumont) | 06 August 2020, 22:38:19 UTC | storage*: Rename and type content_get(List[Sha1]) -> List[Optional[Content]] Related to T645 | 07 August 2020, 10:24:41 UTC |
bfa8f46 | Antoine R. Dumont (@ardumont) | 06 August 2020, 20:56:09 UTC | storage*: Rename content_get_data(Sha1) -> Optional[bytes] Rename the confusing endpoint `content_get` to `content_get_data`. This now works on one content as it is how it is used today. Related to T645 | 07 August 2020, 10:21:36 UTC |
243e873 | Antoine R. Dumont (@ardumont) | 07 August 2020, 09:49:04 UTC | Simplify as Content.ctime None is popped out of a to_dict call in recent model since model 0.6.6 (similarly to the data field) Fixes build [1] [1] https://jenkins.softwareheritage.org/job/DSTO/job/tests/1534/console | 07 August 2020, 10:21:14 UTC |
653b1f9 | Antoine R. Dumont (@ardumont) | 06 August 2020, 10:55:23 UTC | cassandra.storage: Use next token for pagination instead of computing it The existing implementation computed the next token using the tok (adding 1). It's not good enough as it would skip some contents in case of collision on tok (collisions exist as the tok here is a noncryptographic hash on 32 bits). Related to T2518 | 06 August 2020, 16:50:27 UTC |
be9e958 | Antoine R. Dumont (@ardumont) | 05 August 2020, 18:01:20 UTC | in_memory: Drop dead code Related to T645 | 05 August 2020, 18:01:20 UTC |
0d72ea2 | Antoine R. Dumont (@ardumont) | 05 August 2020, 14:10:52 UTC | storage*: content_get_partition(...) -> PagedResult[Content] Related to T645 | 05 August 2020, 15:01:24 UTC |
b48d834 | Antoine R. Dumont (@ardumont) | 05 August 2020, 13:15:01 UTC | storage*: Drop deprecated content_get_range endpoint Related to T645 | 05 August 2020, 13:19:59 UTC |
4722663 | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:56:51 UTC | storage*: object_find_by_sha1_git: Type remaining existing endpoints Related to T2517 | 05 August 2020, 11:06:58 UTC |
334a016 | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:47:46 UTC | storage*: snapshot_get_branches: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:47:46 UTC |
27c7f07 | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:35:31 UTC | storage*: snapshot_count_branches: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:35:31 UTC |
ec620af | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:29:24 UTC | storage*: snapshot_get_by_origin_visit: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:29:24 UTC |
7c6c088 | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:23:47 UTC | storage*: snapshot_get: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:23:47 UTC |
ec4aed4 | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:12:05 UTC | storage*: snapshot_missing: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:23:11 UTC |
7dbd64d | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:10:06 UTC | storage*: release_get: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:23:07 UTC |
5f6630a | Antoine R. Dumont (@ardumont) | 05 August 2020, 10:07:15 UTC | storage*: release_missing: Type remaining existing endpoints Related to T2517 | 05 August 2020, 10:23:03 UTC |
c5d63ad | Antoine R. Dumont (@ardumont) | 05 August 2020, 07:46:37 UTC | storage*: origin_get_by_sha1: Drop generator from pgstorage And simplify its type Related to T645 | 05 August 2020, 09:12:56 UTC |
760cbf6 | Antoine R. Dumont (@ardumont) | 05 August 2020, 06:33:49 UTC | storage*: revision_*log: Type remaining existing endpoints Related to T645 | 05 August 2020, 09:12:56 UTC |
38ee525 | Antoine R. Dumont (@ardumont) | 05 August 2020, 06:17:42 UTC | storage*: revision_get: Type remaining existing endpoints Related to T645 | 05 August 2020, 06:18:28 UTC |
8b6d18e | Antoine R. Dumont (@ardumont) | 05 August 2020, 06:11:04 UTC | storage*: revision_missing: Type remaining existing endpoints Related to T645 | 05 August 2020, 06:11:04 UTC |
9f214bc | Antoine R. Dumont (@ardumont) | 04 August 2020, 21:04:26 UTC | storage*: directory_entry_get_by_path: Type remaining existing endpoints Related to T645 | 04 August 2020, 21:04:26 UTC |
f9d0952 | Antoine R. Dumont (@ardumont) | 04 August 2020, 20:35:45 UTC | storage*: directory_ls: Type remaining existing endpoints Related to T645 | 04 August 2020, 20:43:23 UTC |
fd5fd86 | Antoine R. Dumont (@ardumont) | 04 August 2020, 20:27:45 UTC | storage*: directory_missing: Type remaining existing endpoints Related to T645 | 04 August 2020, 20:27:45 UTC |
5d13cd7 | Antoine R. Dumont (@ardumont) | 04 August 2020, 20:07:34 UTC | storage*: skipped_content_missing: Type remaining existing endpoints Related to T645 | 04 August 2020, 20:17:00 UTC |
1a2aa70 | Antoine R. Dumont (@ardumont) | 04 August 2020, 16:57:37 UTC | storage*: content_missing_per_sha1_git: Type remaining existing endpoints Related to T645 | 04 August 2020, 19:42:19 UTC |
15e4863 | Antoine R. Dumont (@ardumont) | 04 August 2020, 16:55:39 UTC | storage*: content_missing_per_sha1: Type remaining existing endpoints Related to T645 | 04 August 2020, 19:41:36 UTC |
b62afbb | Antoine R. Dumont (@ardumont) | 04 August 2020, 16:13:43 UTC | storage*: content_missing: Unify and type remaining existing endpoints This updates the docstrings as well Related to T645 | 04 August 2020, 16:52:00 UTC |
d6f26e4 | Antoine R. Dumont (@ardumont) | 04 August 2020, 16:06:06 UTC | storage*: content_get_partition: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:51:59 UTC |
8644733 | Antoine R. Dumont (@ardumont) | 04 August 2020, 15:56:39 UTC | storage*: content_get_range: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:51:59 UTC |
c6da282 | Antoine R. Dumont (@ardumont) | 04 August 2020, 15:45:31 UTC | storage*: content_get: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:51:59 UTC |
25ebc48 | Antoine R. Dumont (@ardumont) | 04 August 2020, 15:42:12 UTC | storage*: content_update: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:51:59 UTC |
c32e224 | Antoine R. Dumont (@ardumont) | 04 August 2020, 15:59:46 UTC | storage*: origin_get_by_sha1: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:39:48 UTC |
26ef015 | Antoine R. Dumont (@ardumont) | 04 August 2020, 15:59:24 UTC | storage*: check_config: Type remaining existing endpoints Related to T645 | 04 August 2020, 16:00:30 UTC |
a5232b7 | Antoine R. Dumont (@ardumont) | 04 August 2020, 10:40:24 UTC | tests: Improve coverage on directory_ls endpoints This fixes the current directory listing tests coverage to check down to the contents. This also fixes one inconsistent test data and the tests impacted by this change. | 04 August 2020, 11:34:48 UTC |
15e8c99 | Antoine R. Dumont (@ardumont) | 04 August 2020, 08:06:50 UTC | storage*: Type content_find(...) -> List[Content] Related to T645 | 04 August 2020, 09:22:45 UTC |
3c2e5a3 | Antoine R. Dumont (@ardumont) | 03 August 2020, 11:21:29 UTC | storage*: Type {cnt,dir,rev,rel,snp}_get_random(...) -> Sha1Git Related to T645 | 03 August 2020, 14:23:44 UTC |
aa58e10 | Antoine R. Dumont (@ardumont) | 31 July 2020, 15:56:13 UTC | storage*: Drop origin-get-range in favor of origin-list Related to T645 | 03 August 2020, 09:39:58 UTC |
87c5ba2 | Antoine R. Dumont (@ardumont) | 01 August 2020, 07:07:12 UTC | storage*: Do not allow unknown visit status in origin_visit*_get_latest That makes some storage (pg-storage) fail without that filtering. | 01 August 2020, 07:07:12 UTC |
92f1183 | Antoine R. Dumont (@ardumont) | 31 July 2020, 12:51:14 UTC | storage*: Add type annotation to origin_count Related to T645 | 31 July 2020, 12:51:14 UTC |
3466e48 | Antoine R. Dumont (@ardumont) | 31 July 2020, 11:56:46 UTC | Reuse swh.core stream_results function Related to T645 | 31 July 2020, 12:15:51 UTC |
0eb309e | Valentin Lorentz | 31 July 2020, 11:00:42 UTC | Rename argument 'object_type' of raw_extrinsic_metadata_get to 'type'. For consistency with RawExtrinsicMetadata. | 31 July 2020, 11:00:59 UTC |
b385c79 | Valentin Lorentz | 31 July 2020, 10:30:31 UTC | Make raw_extrinsic_metadata_get return PagedResult instead of Dict. | 31 July 2020, 10:56:34 UTC |
df943ec | Valentin Lorentz | 31 July 2020, 08:11:57 UTC | pg: Rewrite _origin_query to force the query planner to filter on URLs before filtering on visits. URL filters usually have a few matches and use the index; whereas filtering on visits requires to scan the entire origin table first. This makes the query considerably faster. Credit for the idea goes to @olasd. | 31 July 2020, 08:12:41 UTC |
0c5a8e2 | Valentin Lorentz | 30 July 2020, 17:39:41 UTC | Add support for metadata-related object types to the backfiller and replayer. Existing tests automatically test them, using data from swh.journal.tests. | 30 July 2020, 17:39:41 UTC |
24bc51d | Valentin Lorentz | 30 July 2020, 17:33:14 UTC | test_replay: update for swh.journal 0.4.1. DUPLICATE_CONTENTS now contains BaseModel objects. | 30 July 2020, 17:36:49 UTC |
cf9f44e | Antoine R. Dumont (@ardumont) | 30 July 2020, 14:07:53 UTC | storage*: Type origin_search(...) -> PagedResult[Origin] Related to T645 | 30 July 2020, 14:24:55 UTC |
4d52fc1 | Antoine R. Dumont (@ardumont) | 30 July 2020, 12:32:20 UTC | storage*: Adapt origin_list(...) -> PagedResult[Origin] Related to T645 | 30 July 2020, 12:32:20 UTC |
7beba93 | Antoine R. Dumont (@ardumont) | 30 July 2020, 07:58:40 UTC | algos.snapshot: Open snapshot_id_get_from_revision This leverages the latest change in origin_visit_get and origin_visit_status_get to iterate over visit and visit status to detect a snapshot targetting a revision. This algo got used recently in the deposit. It may serve again. Related to T645 | 30 July 2020, 12:10:12 UTC |
b81f928 | Antoine R. Dumont (@ardumont) | 29 July 2020, 14:33:31 UTC | storage*: add origin_visit_status_get(...) -> PagedResult[OriginVisitStatus] Related to T645 | 30 July 2020, 12:05:39 UTC |
8cf6efa | Valentin Lorentz | 29 July 2020, 13:13:04 UTC | Add type annotations on get_storage. The main goal of this commit is to add '-> StorageInterface', so all storage users automatically get type-checked. But mypy was whining about the multiple imports, so this commit also deduplicates the import statements as a side-effect. | 30 July 2020, 11:53:38 UTC |
e63b78c | Valentin Lorentz | 30 July 2020, 09:30:28 UTC | buffer: Pass lists to backend functions, not iterables. Unbreaks swh-loader-core's tests, which are all red when run with the current swh-storage version. Unfortunately, swh-storage's tests did not catch it, because the in-memory backend works fine with iterables, but the pg backend doesn't. | 30 July 2020, 09:30:28 UTC |
7667f7e | Valentin Lorentz | 29 July 2020, 14:59:59 UTC | test_origin_visit_get_all: Use tokens as opaque values. | 29 July 2020, 15:23:33 UTC |
708522d | Valentin Lorentz | 29 July 2020, 14:52:10 UTC | test_origin_visit_get_all: Make assertions consistent. | 29 July 2020, 15:23:24 UTC |
2bfd2f7 | Antoine R. Dumont (@ardumont) | 29 July 2020, 14:55:16 UTC | storage*: Simplify next-page-token computation Related to T645 | 29 July 2020, 15:12:00 UTC |
874646e | Valentin Lorentz | 29 July 2020, 14:51:51 UTC | filter: Fix types passed to the proxied storage. | 29 July 2020, 14:51:51 UTC |
24559bb | Valentin Lorentz | 29 July 2020, 08:30:45 UTC | Fix upcoming type warning with swh.core > v0.1.2. origin_visit_status_get_latest expects an int, not Optional[int]; but this error wasn't detected so far because mypy couldn't detect the type of the function. The next release of swh.core fixes that issue, so this fix is now needed to not trigger a mypy error. | 29 July 2020, 14:24:11 UTC |
b6202a0 | Valentin Lorentz | 29 July 2020, 08:26:32 UTC | Make API endpoints take Lists instead of Iterables as arguments 1. clients crash when they call the API with an iterator 2. some backend implementations violate the contract by assuming the argument is a sequence (eg. by iterating twice on it, and assuming the elements are the same) 3. no matter what we do, the endpoints will always get a list as argument in practice, because they go through the RPC framework 4. there is no concrete (ha!) advantage in taking an Iterable rather than a List. | 29 July 2020, 14:24:11 UTC |
21b7730 | Antoine R. Dumont (@ardumont) | 27 July 2020, 20:17:59 UTC | storage*: use an enum to explicit the order in origin_visit_get Related to T645 | 29 July 2020, 12:43:36 UTC |
643ebc6 | Antoine R. Dumont (@ardumont) | 27 July 2020, 20:17:59 UTC | storage*: origin_visit_get(...) -> PagedResult[OriginVisit] Related to T645 | 29 July 2020, 12:43:36 UTC |
f543bd5 | Valentin Lorentz | 28 July 2020, 13:59:35 UTC | Write metadata + metadata authorities/fetchers to the journal. | 28 July 2020, 13:59:35 UTC |