Related to latest swh.model change (from List to Tuple).
This should fix the latest ci build failure [1]
[1] https://jenkins.softwareheritage.org/job/DSTO/job/tests/1217/console
Related to D3177
Differential D3211
cassandra.converters: Fix revision type ardumont on Jun 3 2020, 12:29 PM. Authored by Tags None Subscribers None
Details Related to latest swh.model change (from List to Tuple). This should fix the latest ci build failure [1] [1] https://jenkins.softwareheritage.org/job/DSTO/job/tests/1217/console Related to D3177 tox -e mypy is happier
Diff Detail
Event TimelineComment Actions Build has FAILED Patch application report for D3211 (id=11394)Rebasing onto eef4900db5... Current branch diff-target is up to date. Changes applied before testcommit 076ac326789f15979c2a80260d323e360ac756dc Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Wed Jun 3 12:29:04 2020 +0200 cassandra.converters: Fix revision type Related to latest swh.model change (from List to Tuple). Fixes the latest ci build failure [1] [1] https://jenkins.softwareheritage.org/job/DSTO/job/tests/1217/console Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/208/ Comment Actions
yes, trying to fix that. There is something somewhere which converts back tuple into a list... [1] [1] .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_api_client.py::TestStorage::test_revision_get_order <- .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > /home/tony/work/inria/repo/swh/swh-environment/swh-storage/.tox/py3/lib/python3.7/site-packages/swh/storage/in_memory.py(482)revision_get() -> yield rev (Pdb) rev {'message': b'hello', 'author': {'fullname': b'Nicolas Dandrimont <nicolas@example.com> ', 'name': b'Nicolas Dandrimont', 'email': b'nicolas@example.com'}, 'committer': {'fullname': b'St\xc3fano Zacchiroli <stefano@example.com>', 'name': b'St\xc3fano Zacchiroli', 'email': b'stefano@example.com'}, 'date': {'timestamp': {'seconds': 1234567890, 'microseconds': 0}, 'offset': 120, 'negative_utc': False}, 'committer_date': {'timestamp': {'seconds': 1123456789, 'microseconds': 0}, 'offset': 0, 'negative_utc': True}, 'type': 'git', 'directory': b'4\x013B2S1\x000\xf51\xe62\xa73\xff7\xc3\xa90', 'synthetic': True, 'metadata': {'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude', 'extra_headers': [['gpgsig', b'test123'], ['mergetags', [b'foo\\bar', b'"\xaf\x89\x80\x01\x00']]]}, 'parents': (b'01234567890123456789', b'23434512345123456789'), 'id': b'56789012345678901234'} (Pdb) rev['parents'] (b'01234567890123456789', b'23434512345123456789') (Pdb) c >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB continue >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > /home/tony/work/inria/repo/swh/swh-environment/swh-storage/.tox/py3/lib/python3.7/site-packages/swh/storage/in_memory.py(482)revision_get() -> yield rev (Pdb) c >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB continue >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > /home/tony/work/inria/repo/swh/swh-environment/swh-storage/.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py(1020)test_revision_get_order() -> assert res1 == expected_revs (Pdb) [r['parents'] for r in res1] [[b'01234567890123456789', b'23434512345123456789'], [b'01234567890123456789']] Comment Actions My feeling for now is it's serialization related... (we are using msgpack) In [1]: import msgpack In [2]: msgpack.packb(tuple([1, 2, 3]), use_bin_type=True) Out[2]: b'\x93\x01\x02\x03' In [3]: msgpack.unpackb(_, raw=False) Out[3]: [1, 2, 3]In [1]: import msgpack In [2]: msgpack.packb(tuple([1, 2, 3]), use_bin_type=True) Out[2]: b'\x93\x01\x02\x03' In [3]: msgpack.unpackb(_, raw=False) Out[3]: [1, 2, 3] In [2]: msgpack.packb({'a': (1, 2, 3)}, use_bin_type=True) Out[2]: b'\x81\xa1a\x93\x01\x02\x03' In [3]: msgpack.unpackb(_, raw=False) Out[3]: {'a': [1, 2, 3]} |