Problem:
Katello upload python package: apache_airflow-2.9.3-py3-none-any.whl failed.
Expected outcome:
Upload successful.
Foreman and Proxy versions:
Foreman 3.9.1, Proxy 3.9.1
Foreman and Proxy plugin versions:
Foreman 3.9.1, Katello 4.11.0, Foreman-tasks 9.0.0
Distribution and version:
Red Hat Enterprise Linux 8.9
Other relevant data:
Input:
{"repository_id"=>4214,
"smart_proxy_id"=>1,
"tasks"=>
[{"pulp_href"=>"/pulp/api/v3/tasks/01912ce9-a27d-762e-8ce7-d7256b468b43/",
"pulp_created"=>"2024-08-07T12:56:34.686+00:00",
"state"=>"completed",
"name"=>"pulpcore.app.tasks.upload.commit",
"logging_cid"=>"3bb48d75-0eac-4b51-9735-883b4f5ddec9",
"created_by"=>"/pulp/api/v3/users/1/",
"started_at"=>"2024-08-07T12:56:34.773+00:00",
"finished_at"=>"2024-08-07T12:56:35.192+00:00",
"worker"=>"/pulp/api/v3/workers/019012ce-2a7f-7009-846d-208efc03375f/",
"child_tasks"=>[],
"progress_reports"=>[],
"created_resources"=>
["/pulp/api/v3/artifacts/01912ce9-a42e-7dc3-a8cb-f61ff4b7fdf9/"],
"reserved_resources_record"=>
["/pulp/api/v3/uploads/01912ce9-9c5e-7314-967b-34c2980a6766/",
"shared:/pulp/api/v3/domains/018d35a6-7d26-7eda-9c61-75801b2b21d1/"]}],
"unit_type_id"=>"python_package",
"options"=>
{"file_name"=>"apache_airflow-2.9.3-py3-none-any.whl",
"sha256"=>
"4a36cb5dbd9925448ef171b72f2db0656121383e16306eded723331963d169db"},
"remote_user"=>"admin",
"remote_cp_user"=>"admin",
"current_request_id"=>"3bb48d75-0eac-4b51-9735-883b4f5ddec9",
"current_timezone"=>"Warsaw",
"current_organization_id"=>1,
"current_location_id"=>2,
"current_user_id"=>4}
Output:
{"pulp_tasks"=>
[{"pulp_href"=>"/pulp/api/v3/tasks/01912ce9-a76c-7d22-b565-e105a68e0989/",
"pulp_created"=>"2024-08-07T12:56:35.949+00:00",
"state"=>"failed",
"name"=>"pulpcore.app.tasks.base.general_create",
"logging_cid"=>"3bb48d75-0eac-4b51-9735-883b4f5ddec9",
"created_by"=>"/pulp/api/v3/users/1/",
"started_at"=>"2024-08-07T12:56:36.037+00:00",
"finished_at"=>"2024-08-07T12:56:36.313+00:00",
"error"=>
{"traceback"=>
" File \"/usr/lib/python3.11/site-packages/pulpcore/tasking/tasks.py\", line 61, in _execute_task\n" +
" result = func(*args, **kwargs)\n" +
" ^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/app/tasks/base.py\", line 38, in general_create\n" +
" instance = serializer.save()\n" +
" ^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/app/serializers/base.py\", line 450, in save\n" +
" raise e\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/app/serializers/base.py\", line 444, in save\n" +
" return super().save(**kwargs)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/rest_framework/serializers.py\", line 212, in save\n" +
" self.instance = self.create(validated_data)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/plugin/serializers/content.py\", line 137, in create\n" +
" result = super().create(validated_data)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/app/serializers/content.py\", line 68, in create\n" +
" content = self.Meta.model.objects.create(**validated_data)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/manager.py\", line 87, in manager_method\n" +
" return getattr(self.get_queryset(), name)(*args, **kwargs)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/query.py\", line 658, in create\n" +
" obj.save(force_insert=True, using=self.db)\n" +
" File \"/usr/lib/python3.11/site-packages/pulpcore/app/models/base.py\", line 160, in save\n" +
" return super().save(*args, **kwargs)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib64/python3.11/contextlib.py\", line 81, in inner\n" +
" return func(*args, **kwds)\n" +
" ^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django_lifecycle/mixins.py\", line 169, in save\n" +
" save(*args, **kwargs)\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/base.py\", line 814, in save\n" +
" self.save_base(\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/base.py\", line 877, in save_base\n" +
" updated = self._save_table(\n" +
" ^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/base.py\", line 1020, in _save_table\n" +
" results = self._do_insert(\n" +
" ^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/base.py\", line 1061, in _do_insert\n" +
" return manager._insert(\n" +
" ^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/manager.py\", line 87, in manager_method\n" +
" return getattr(self.get_queryset(), name)(*args, **kwargs)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/query.py\", line 1805, in _insert\n" +
" return query.get_compiler(using=using).execute_sql(returning_fields)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/models/sql/compiler.py\", line 1822, in execute_sql\n" +
" cursor.execute(sql, params)\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 67, in execute\n" +
" return self._execute_with_wrappers(\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 80, in _execute_with_wrappers\n" +
" return executor(sql, params, many, context)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 84, in _execute\n" +
" with self.db.wrap_database_errors:\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/utils.py\", line 91, in __exit__\n" +
" raise dj_exc_value.with_traceback(traceback) from exc_value\n" +
" File \"/usr/lib/python3.11/site-packages/django/db/backends/utils.py\", line 89, in _execute\n" +
" return self.cursor.execute(sql, params)\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
" File \"/usr/lib/python3.11/site-packages/psycopg/cursor.py\", line 723, in execute\n" +
" raise ex.with_traceback(None)\n",
"description"=>
"null value in column \"version\" violates not-null constraint\n" +
"DETAIL: Failing row contains (01912ce9-a8ab-7ee9-8d33-2777b7efd3d6, apache_airflow-2.9.3-py3-none-any.whl, bdist_wheel, , null, 2.3, , <!--\n" +
"Licensed to the Apache Software Foundation (ASF) under one\n" +
"..., , , , , , , , , , , , , \"[]\", \"[]\", \"[]\", \"[]\", \"[]\", , 4a36cb5dbd9925448ef171b72f2db0656121383e16306eded723331963d169db, , \"{}\")."},
"worker"=>"/pulp/api/v3/workers/019012ce-2a6a-732c-8f75-b48385e73d87/",
"child_tasks"=>[],
"progress_reports"=>[],
"created_resources"=>[],
"reserved_resources_record"=>
["shared:/pulp/api/v3/domains/018d35a6-7d26-7eda-9c61-75801b2b21d1/"]}],
"task_groups"=>[],
"poll_attempts"=>{"total"=>1, "failed"=>1}}
Exception:
Katello::Errors::Pulp3Error: null value in column "version" violates not-null constraint
DETAIL: Failing row contains (01912ce9-e579-7582-b020-094a6e6bef7f, attrs-24.2.0-py3-none-any.whl, bdist_wheel, , null, 2.3, , <p align="center">
<a href="https://www.attrs.org/">
<img ..., , , , , , , , , , , , , "[]", "[]", "[]", "[]", "[]", , 81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2, , "{}").