Page MenuHomeSoftware Heritage
Paste P725

drop validate proxy and this follows (tuple serialization rendered to [] thus comparison failure)
ActivePublic

Authored by ardumont on Jul 21 2020, 9:38 AM.
================================================================================================================== FAILURES ===================================================================================================================
_____________________________________________________________________________________________________ TestStorage.test_revision_get_order _____________________________________________________________________________________________________
self = <swh.storage.tests.test_api_client.TestStorage object at 0x7f53d4df3ef0>, swh_storage = <RemoteStorage url=mock://example.com/>
sample_data_model = {'authority': [MetadataAuthority(type=<MetadataAuthorityType.DEPOSIT_CLIENT: 'deposit_client'>, url='http://hal.inria....\x11', length=7, status='visible', data=b'424242\n', ctime=datetime.datetime(2019, 12, 1, 0, 0, tzinfo=tzutc()))], ...}
def test_revision_get_order(self, swh_storage, sample_data_model):
revision, revision2 = sample_data_model["revision"][:2]
add_result = swh_storage.revision_add([revision, revision2])
assert add_result == {"revision:add": 2}
# order 1
res1 = swh_storage.revision_get([revision.id, revision2.id])
import pdb; pdb.set_trace()
> assert list(res1) == [revision.to_dict(), revision2.to_dict()]
E assert [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont <nicolas@example.com> ',\n 'name': b'Nicolas Dandrimont'},\n 'committer': {'email': b'stefano@example.com',\n 'fullname': b'St\xc3fano Zacchiroli <stefano@example.com>',\n 'name': b'St\xc3fano Zacchiroli'},\n 'committer_date': {'negative_utc': True,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': 120,\n 'timestamp': {'microseconds': 0, 'seconds': 1234567890}},\n 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e'\n b'\xed\xc3\x96\xbe',\n 'extra_headers': [[b'gpgsig', b'test123'],\n [b'mergetag', b'foo\\bar'],\n [b'mergetag', b'"\xaf\x89\x80\x01\x00']],\n 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7',\n 'message': b'hello',\n 'metadata': {'checksums': {'sha1': 'tarball-sha1',\n 'sha256': 'tarball-sha256'},\n 'signed-off-by': 'some-dude'},\n 'parents': [b'01234567890123456789', b'23434512345123456789'],\n 'synthetic': True,\n 'type': 'git'},\n {'author': {'email': b'roberto@example.com',\n 'fullname': b'Roberto Dicosmo <roberto@example.com>',\n 'name': b'Roberto Dicosmo'},\n 'committer': {'email': b'ar@dumont.fr',\n 'fullname': b'tony <ar@dumont.fr>',\n 'name': b'tony'},\n 'committer_date': {'negative_utc': False,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': -720,\n 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}},\n 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab',\n 'extra_headers': [],\n 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa',\n 'message': b'hello again',\n 'metadata': None,\n 'parents': [b'01234567890123456789'],\n 'synthetic': False,\n 'type': 'git'}] == [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont <nicolas@example.com> ',\n 'name': b'Nicolas Dandrimont'},\n 'committer': {'email': b'stefano@example.com',\n 'fullname': b'St\xc3fano Zacchiroli <stefano@example.com>',\n 'name': b'St\xc3fano Zacchiroli'},\n 'committer_date': {'negative_utc': True,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': 120,\n 'timestamp': {'microseconds': 0, 'seconds': 1234567890}},\n 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e'\n b'\xed\xc3\x96\xbe',\n 'extra_headers': ((b'gpgsig', b'test123'),\n (b'mergetag', b'foo\\bar'),\n (b'mergetag', b'"\xaf\x89\x80\x01\x00')),\n 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7',\n 'message': b'hello',\n 'metadata': {'checksums': {'sha1': 'tarball-sha1',\n 'sha256': 'tarball-sha256'},\n 'signed-off-by': 'some-dude'},\n 'parents': (b'01234567890123456789', b'23434512345123456789'),\n 'synthetic': True,\n 'type': 'git'},\n {'author': {'email': b'roberto@example.com',\n 'fullname': b'Roberto Dicosmo <roberto@example.com>',\n 'name': b'Roberto Dicosmo'},\n 'committer': {'email': b'ar@dumont.fr',\n 'fullname': b'tony <ar@dumont.fr>',\n 'name': b'tony'},\n 'committer_date': {'negative_utc': False,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': -720,\n 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}},\n 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab',\n 'extra_headers': (),\n 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa',\n 'message': b'hello again',\n 'metadata': None,\n 'parents': (b'01234567890123456789',),\n 'synthetic': False,\n 'type': 'git'}]
E At index 0 diff: {'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\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e\xed\xc3\x96\xbe', 'synthetic': True, 'metadata': {'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude'}, 'parents': [b'01234567890123456789', b'23434512345123456789'], 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7', 'extra_headers': [[b'gpgsig', b'test123'], [b'mergetag', b'foo\\bar'], [b'mergetag', b'"\xaf\x89\x80\x01\x00']]} != {'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\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e\xed\xc3\x96\xbe', 'synthetic': True, 'metadata': {'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude'}, 'parents': (b'01234567890123456789', b'23434512345123456789'), 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7', 'extra_headers': ((b'gpgsig', b'test123'), (b'mergetag', b'foo\\bar'), (b'mergetag', b'"\xaf\x89\x80\x01\x00'))}
E Full diff:
E [
E {'author': {'email': b'nicolas@example.com',
E 'fullname': b'Nicolas Dandrimont <nicolas@example.com> ',
E 'name': b'Nicolas Dandrimont'},
E 'committer': {'email': b'stefano@example.com',
E 'fullname': b'St\xc3fano Zacchiroli <stefano@example.com>',
E 'name': b'St\xc3fano Zacchiroli'},
E 'committer_date': {'negative_utc': True,
E 'offset': 0,
E 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},
E 'date': {'negative_utc': False,
E 'offset': 120,
E 'timestamp': {'microseconds': 0, 'seconds': 1234567890}},
E 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e'
E b'\xed\xc3\x96\xbe',
E - 'extra_headers': ((b'gpgsig', b'test123'),
E ? ^^ ^
E + 'extra_headers': [[b'gpgsig', b'test123'],
E ? ^^ ^
E - (b'mergetag', b'foo\\bar'),
E ? ^ ^
E + [b'mergetag', b'foo\\bar'],
E ? ^ ^
E - (b'mergetag', b'"\xaf\x89\x80\x01\x00')),
E ? ^ ^^
E + [b'mergetag', b'"\xaf\x89\x80\x01\x00']],
E ? ^ ^^
E 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7',
E 'message': b'hello',
E 'metadata': {'checksums': {'sha1': 'tarball-sha1',
E 'sha256': 'tarball-sha256'},
E 'signed-off-by': 'some-dude'},
E - 'parents': (b'01234567890123456789', b'23434512345123456789'),
E ? ^ ^
E + 'parents': [b'01234567890123456789', b'23434512345123456789'],
E ? ^ ^
E 'synthetic': True,
E 'type': 'git'},
E {'author': {'email': b'roberto@example.com',
E 'fullname': b'Roberto Dicosmo <roberto@example.com>',
E 'name': b'Roberto Dicosmo'},
E 'committer': {'email': b'ar@dumont.fr',
E 'fullname': b'tony <ar@dumont.fr>',
E 'name': b'tony'},
E 'committer_date': {'negative_utc': False,
E 'offset': 0,
E 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},
E 'date': {'negative_utc': False,
E 'offset': -720,
E 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}},
E 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab',
E - 'extra_headers': (),
E ? ^^
E + 'extra_headers': [],
E ? ^^
E 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa',
E 'message': b'hello again',
E 'metadata': None,
E - 'parents': (b'01234567890123456789',),
E ? ^ --
E + 'parents': [b'01234567890123456789'],
E ? ^ +
E 'synthetic': False,
E 'type': 'git'},
E ]
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:963: AssertionError
=========================================================================================================== short test summary info ===========================================================================================================
FAILED .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_api_client.py::TestStorage::test_revision_get_order - assert [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont <nicolas@exampl...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================================================================== 1 failed, 770 deselected in 3.12s ======================================================================================================
ERROR: InvocationError for command /home/tony/work/inria/repo/swh/swh-environment/swh-storage/.tox/py3/bin/pytest --hypothesis-profile=fast --cov=/home/tony/work/inria/repo/swh/swh-environment/swh-storage/.tox/py3/lib/python3.7/site-packages/swh/storage .tox/py3/lib/python3.7/site-packages/swh/storage --doctest-modules --cov-branch -vv --no-cov -x -s -m 'not cassandra' -k test_revision_get_order (exited with code 1)
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR: black: commands failed
ERROR: flake8: commands failed
mypy: commands succeeded
ERROR: py3: commands failed

Event Timeline

ardumont changed the title of this paste from drop validate proxy and this follows to drop validate proxy and this follows (tuple serialization rendered to [] thus comparison failure).

Because the validate proxy grew behavior it should not have.