Actions
Issue #9250
closedimproper validation when passing json as requirements yaml
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:
Description
Json seems to be a subset of yaml in some cases and with some libraries. Pulp's parsing seems to allow it as something like this:
{"collections": "theforeman.foreman"}
works fine as a requirements.yaml on a remote. However when you sync, you get a traceback:
{"traceback"=>
" File \"/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 272, in _perform_task\n" +
" result = func(*args, **kwargs)\n" +
" File \"/usr/local/lib/python3.6/site-packages/pulp_ansible/app/tasks/collections.py\", line 130, in sync\n" +
" repo_version = d_version.create()\n" +
" File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py\", line 151, in create\n" +
" loop.run_until_complete(pipeline)\n" +
" File \"/usr/lib64/python3.6/asyncio/base_events.py\", line 484, in run_until_complete\n" +
" return future.result()\n" +
" File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 225, in create_pipeline\n" +
" await asyncio.gather(*futures)\n" +
" File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 43, in __call__\n" +
" await self.run()\n" +
" File \"/usr/local/lib/python3.6/site-packages/pulp_ansible/app/tasks/collections.py\", line 778, in run\n" +
" await asyncio.gather(*tasks)\n" +
" File \"/usr/local/lib/python3.6/site-packages/pulp_ansible/app/tasks/collections.py\", line 587, in _fetch_collection_metadata\n" +
" namespace, name = requirements_entry.name.split(\".\")\n",
"description"=>"not enough values to unpack (expected 2, got 1)"},
So it seems like that format should either error on save (like other invalid yaml does), or work for syncing
Updated by fao89 over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Updated by pulpbot over 3 years ago
- Status changed from ASSIGNED to POST
Added by Fabricio Aguiar about 3 years ago
Updated by Anonymous about 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp_ansible|c7e4276ff9244b3e7526e374f95907360e5a8e6c.
Updated by pulpbot about 3 years ago
Added by Fabricio Aguiar about 3 years ago
Revision 3624c822 | View on GitHub
Improve validation when parsing requirements.yml
closes #9250
(cherry picked from commit c7e4276ff9244b3e7526e374f95907360e5a8e6c)
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Improve validation when parsing requirements.yml
closes #9250