tripleo-common openstack-tox-py27 job failingtripleo_common.tests.image.test_image_uploader.TestPythonImageUploader.test_copy_manifest_config_to_registry* tests

Bug #1867648 reported by Jesse Pretorius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Alex Schultz

Bug Description

With https://review.opendev.org/710281 stable/train is failing the openstack-tox-py27 job. This can be seen in https://52b57dfa34039b480d7a-b6631615bf9035ccf374ffb9cb335ff2.ssl.cf1.rackcdn.com/713195/1/check/openstack-tox-py27/c700e7c/job-output.txt

With the review reverted, the tests all pass.

I have locally reproduced this failure in an environment with python2.7 available and https://review.opendev.org/713195 applied.

The failing output is:

2020-03-16 11:35:08.869440 | ubuntu-bionic | ==============================
2020-03-16 11:35:08.869458 | ubuntu-bionic | Failed 3 tests - output below:
2020-03-16 11:35:08.869479 | ubuntu-bionic | ==============================
2020-03-16 11:35:08.869494 | ubuntu-bionic |
2020-03-16 11:35:08.869509 | ubuntu-bionic | tripleo_common.tests.image.test_image_uploader.TestPythonImageUploader.test_copy_manifest_config_to_registry_oci
2020-03-16 11:35:08.869524 | ubuntu-bionic | ----------------------------------------------------------------------------------------------------------------
2020-03-16 11:35:08.869539 | ubuntu-bionic |
2020-03-16 11:35:08.869553 | ubuntu-bionic | Captured traceback:
2020-03-16 11:35:08.869568 | ubuntu-bionic | ~~~~~~~~~~~~~~~~~~~
2020-03-16 11:35:08.869582 | ubuntu-bionic | Traceback (most recent call last):
2020-03-16 11:35:08.869597 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1330, in patched
2020-03-16 11:35:08.869612 | ubuntu-bionic | return func(*args, **keywargs)
2020-03-16 11:35:08.869627 | ubuntu-bionic | File "tripleo_common/tests/image/test_image_uploader.py", line 2201, in test_copy_manifest_config_to_registry_oci
2020-03-16 11:35:08.869642 | ubuntu-bionic | target_put.assert_has_calls(calls)
2020-03-16 11:35:08.869656 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 978, in assert_has_calls
2020-03-16 11:35:08.869679 | ubuntu-bionic | ), cause)
2020-03-16 11:35:08.869694 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/six.py", line 737, in raise_from
2020-03-16 11:35:08.869710 | ubuntu-bionic | raise value
2020-03-16 11:35:08.869724 | ubuntu-bionic | AssertionError: Calls not found.
2020-03-16 11:35:08.869740 | ubuntu-bionic | Expected: [call('https://192.168.2.1:5000/v2/t/nova-api', data='{\n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "config": {\n "mediaType": "application/vnd.docker.container.image.v1+json", \n "digest": "sha256:1234", \n "size": 2\n }, \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', headers={'Content-Type': 'application/vnd.docker.distribution.manifest.v2+json'}, timeout=30)]
2020-03-16 11:35:08.869758 | ubuntu-bionic | Actual: [call('https://192.168.2.1:5000/v2/t/nova-api', data='{\n "config": {\n "size": 2, \n "digest": "sha256:1234", \n "mediaType": "application/vnd.docker.container.image.v1+json"\n }, \n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', headers={'Content-Type': 'application/vnd.docker.distribution.manifest.v2+json'}, timeout=30)].
2020-03-16 11:35:08.869773 | ubuntu-bionic |
2020-03-16 11:35:08.869788 | ubuntu-bionic |
2020-03-16 11:35:08.869802 | ubuntu-bionic | tripleo_common.tests.image.test_image_uploader.TestPythonImageUploader.test_copy_manifest_config_to_registry_export
2020-03-16 11:35:08.869817 | ubuntu-bionic | -------------------------------------------------------------------------------------------------------------------
2020-03-16 11:35:08.869831 | ubuntu-bionic |
2020-03-16 11:35:08.869845 | ubuntu-bionic | Captured traceback:
2020-03-16 11:35:08.869860 | ubuntu-bionic | ~~~~~~~~~~~~~~~~~~~
2020-03-16 11:35:08.869874 | ubuntu-bionic | Traceback (most recent call last):
2020-03-16 11:35:08.869888 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1330, in patched
2020-03-16 11:35:08.869903 | ubuntu-bionic | return func(*args, **keywargs)
2020-03-16 11:35:08.869917 | ubuntu-bionic | File "tripleo_common/tests/image/test_image_uploader.py", line 2140, in test_copy_manifest_config_to_registry_export
2020-03-16 11:35:08.869931 | ubuntu-bionic | export_mock.assert_has_calls(calls)
2020-03-16 11:35:08.869946 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 978, in assert_has_calls
2020-03-16 11:35:08.869961 | ubuntu-bionic | ), cause)
2020-03-16 11:35:08.869975 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/six.py", line 737, in raise_from
2020-03-16 11:35:08.869992 | ubuntu-bionic | raise value
2020-03-16 11:35:08.870011 | ubuntu-bionic | AssertionError: Calls not found.
2020-03-16 11:35:08.870026 | ubuntu-bionic | Expected: [call(ParseResult(scheme='docker', netloc='192.168.2.1:5000', path='/t/nova-api:latest', params='', query='', fragment=''), '{\n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "config": {\n "mediaType": "application/vnd.docker.container.image.v1+json", \n "digest": "sha256:1234", \n "size": 2\n }, \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', 'application/vnd.docker.distribution.manifest.v2+json', None, multi_arch=False)]
2020-03-16 11:35:08.878220 | ubuntu-bionic | Actual: [call(ParseResult(scheme='docker', netloc='192.168.2.1:5000', path='/t/nova-api:latest', params='', query='', fragment=''), '{\n "config": {\n "size": 2, \n "digest": "sha256:1234", \n "mediaType": "application/vnd.docker.container.image.v1+json"\n }, \n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', 'application/vnd.docker.distribution.manifest.v2+json', None, multi_arch=False)].
2020-03-16 11:35:08.878250 | ubuntu-bionic |
2020-03-16 11:35:08.878267 | ubuntu-bionic |
2020-03-16 11:35:08.878282 | ubuntu-bionic | tripleo_common.tests.image.test_image_uploader.TestPythonImageUploader.test_copy_manifest_config_to_registry
2020-03-16 11:35:08.878298 | ubuntu-bionic | ------------------------------------------------------------------------------------------------------------
2020-03-16 11:35:08.878312 | ubuntu-bionic |
2020-03-16 11:35:08.878326 | ubuntu-bionic | Captured traceback:
2020-03-16 11:35:08.878339 | ubuntu-bionic | ~~~~~~~~~~~~~~~~~~~
2020-03-16 11:35:08.878353 | ubuntu-bionic | Traceback (most recent call last):
2020-03-16 11:35:08.878367 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1330, in patched
2020-03-16 11:35:08.878382 | ubuntu-bionic | return func(*args, **keywargs)
2020-03-16 11:35:08.878396 | ubuntu-bionic | File "tripleo_common/tests/image/test_image_uploader.py", line 2096, in test_copy_manifest_config_to_registry
2020-03-16 11:35:08.878423 | ubuntu-bionic | target_put.assert_has_calls(calls)
2020-03-16 11:35:08.878440 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 978, in assert_has_calls
2020-03-16 11:35:08.878455 | ubuntu-bionic | ), cause)
2020-03-16 11:35:08.878469 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-common/.tox/py27/lib/python2.7/site-packages/six.py", line 737, in raise_from
2020-03-16 11:35:08.878485 | ubuntu-bionic | raise value
2020-03-16 11:35:08.878499 | ubuntu-bionic | AssertionError: Calls not found.
2020-03-16 11:35:08.878514 | ubuntu-bionic | Expected: [call('https://192.168.2.1:5000/v2/t/nova-api', data='{\n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "config": {\n "mediaType": "application/vnd.docker.container.image.v1+json", \n "digest": "sha256:1234", \n "size": 2\n }, \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', headers={'Content-Type': 'application/vnd.docker.distribution.manifest.v2+json'}, timeout=30)]
2020-03-16 11:35:08.878530 | ubuntu-bionic | Actual: [call('https://192.168.2.1:5000/v2/t/nova-api', data='{\n "config": {\n "size": 2, \n "digest": "sha256:1234", \n "mediaType": "application/vnd.docker.container.image.v1+json"\n }, \n "layers": [\n {\n "digest": "sha256:aaaa"\n }, \n {\n "digest": "sha256:bbbb"\n }\n ], \n "mediaType": "application/vnd.docker.distribution.manifest.v2+json"\n}', headers={'Content-Type': u'application/vnd.docker.distribution.manifest.v2+json'}, timeout=30)].

description: updated
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → ussuri-3
assignee: nobody → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/713280

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.opendev.org/713303

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/713305

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/713303
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=23ec01dc3f9d16e1fe73c1bc96cb0983574098a6
Submitter: Zuul
Branch: master

commit 23ec01dc3f9d16e1fe73c1bc96cb0983574098a6
Author: Alex Schultz <email address hidden>
Date: Mon Mar 16 10:12:32 2020 -0600

    Change how we test for call

    It appears that there are json comparison issues for some versions <= py35
    so we need to check that the expected manifest matches in a different
    way to ensure compatibility between py27 and newer. Since we've dropped
    these versions of python in Ussuri, this only applies to older version.

    Change-Id: I011cb62850bb4f298f78a1cfede4e60044523be6
    Closes-Bug: #1867648

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

Reviewed: https://review.opendev.org/713305
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=236cf7c09373ddc5a0c7c92e644af6ebe6ba79b6
Submitter: Zuul
Branch: stable/stein

commit 236cf7c09373ddc5a0c7c92e644af6ebe6ba79b6
Author: Alex Schultz <email address hidden>
Date: Mon Mar 16 10:12:32 2020 -0600

    Change how we test for call

    It appears that there are json comparison issues for some versions <= py35
    so we need to check that the expected manifest matches in a different
    way to ensure compatibility between py27 and newer. Since we've dropped
    these versions of python in Ussuri, this only applies to older version.

    Change-Id: I011cb62850bb4f298f78a1cfede4e60044523be6
    Closes-Bug: #1867648
    (cherry picked from commit 23ec01dc3f9d16e1fe73c1bc96cb0983574098a6)

tags: added: in-stable-stein
tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/train)

Reviewed: https://review.opendev.org/713280
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=69158f678236a5cf62c74a6a64e0aabac42e05ea
Submitter: Zuul
Branch: stable/train

commit 69158f678236a5cf62c74a6a64e0aabac42e05ea
Author: Alex Schultz <email address hidden>
Date: Mon Mar 16 10:12:32 2020 -0600

    Change how we test for call

    It appears that there are json comparison issues for some versions <= py35
    so we need to check that the expected manifest matches in a different
    way to ensure compatibility between py27 and newer. Since we've dropped
    these versions of python in Ussuri, this only applies to older version.

    Change-Id: I011cb62850bb4f298f78a1cfede4e60044523be6
    Closes-Bug: #1867648
    (cherry picked from commit 23ec01dc3f9d16e1fe73c1bc96cb0983574098a6)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 12.2.0

This issue was fixed in the openstack/tripleo-common 12.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common stein-eol

This issue was fixed in the openstack/tripleo-common stein-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-common/+/847337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by "Takashi Kajinami <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-common/+/847337

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.