Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync test fails when server doesn't have signatures/marks expected by client #1387

Closed
rochacbruno opened this issue Mar 3, 2023 · 0 comments · Fixed by #1385
Closed

Sync test fails when server doesn't have signatures/marks expected by client #1387

rochacbruno opened this issue Mar 3, 2023 · 0 comments · Fixed by #1385

Comments

@rochacbruno
Copy link
Member

Problrm introduced by #1326

stage sync tests fail when syncing a PAH from master:

ERROR    galaxy_ng.tests.integration.utils.tasks:tasks.py:30 {'traceback': '  File "/usr/local/lib/python3.8/site-
packages/pulpcore/tasking/pulpcore_worker.py", line 453, in _perform_task\n    result = func(*args, **kwargs)\n  File 
"/usr/local/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 191, in sync\n    repo_version = 
d_version.create()\n  File "/usr/local/lib/python3.8/site-packages/pulpcore/plugin/stages/declarative_version.py", line 161, in
 create\n    loop.run_until_complete(pipeline)\n  File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in 
run_until_complete\n    return future.result()\n  File "/usr/local/lib/python3.8/site-packages/pulpcore/plugin/stages/api.py",
 line 225, in create_pipeline\n    await asyncio.gather(*futures)\n  File "/usr/local/lib/python3.8/site-
packages/pulpcore/plugin/stages/api.py", line 43, in __call__\n    await self.run()\n  File "/usr/local/lib/python3.8/site-
packages/pulp_ansible/app/tasks/collections.py", line 1023, in run\n    await asyncio.gather(*tasks)\n  File 
"/usr/local/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 817, in _fetch_collection_metadata\n   
 await self._fetch_paginated_collection_metadata(\n  File "/usr/local/lib/python3.8/site-
packages/pulp_ansible/app/tasks/collections.py", line 760, in _fetch_paginated_collection_metadata\n    await 
asyncio.gather(*tasks)\n  File "/usr/local/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 573, in 
_fetch_collection_version_metadata\n    await self._add_collection_version(api_version, collection_version_url, metadata)\n  File
 "/usr/local/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 650, in _add_collection_version\n    for 
mark_value in marks:\n', 'description': "'NoneType' object is not iterable"}

Client running pulp_ansible main expects fields signatures and marks however the server doesn't have one of the fields yet (older version).

The current problem is on marks but is is a potential problem with signatures also, so the fix might include default value for both.

rochacbruno added a commit to rochacbruno/pulp_ansible that referenced this issue Mar 3, 2023
When syncing from a remote that has no marks or no signatures (older
version) this ensures the field on sync defaults to empty list avoiding
iteration error.

fixes: pulp#1387
rochacbruno added a commit to rochacbruno/pulp_ansible that referenced this issue Mar 3, 2023
When syncing from a remote that has no marks or no signatures (older
version) this ensures the field on sync defaults to empty list avoiding
iteration error.

fixes: pulp#1387
mdellweg pushed a commit that referenced this issue Mar 3, 2023
When syncing from a remote that has no marks or no signatures (older
version) this ensures the field on sync defaults to empty list avoiding
iteration error.

fixes: #1387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant