Upload python package: apache_airflow-2.9.3-py3-none-any.whl Katello::Errors::Pulp3Error: null value in column "version" violates not-null constraint

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, , "{}").

Hi @kuzyn2000

I can reproduce the issue on Foreman 3.9:

2024-08-07T15:50:44 [E|bac|51d128e3] null value in column "version" violates not-null constraint
 51d128e3 | DETAIL:  Failing row contains (01912d1b-33c0-7f60-96f8-5b407c22a948, apache_airflow-2.9.3-py3-none-any.whl, bdist_wheel, , null, 2.3, , <!--
 51d128e3 | Licensed to the Apache Software Foundation (ASF) under one
 51d128e3 | ..., , , , , , , , , , , , , "[]", "[]", "[]", "[]", "[]", , 4a36cb5dbd9925448ef171b72f2db0656121383e16306eded723331963d169db, , "{}"). (Katello::Errors::Pulp3Error)
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:108:in `block in check_for_errors'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:106:in `each'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:106:in `check_for_errors'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:162:in `poll_external_task'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/polling.rb:100:in `poll_external_task_with_rescue'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/polling.rb:22:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/cancellable.rb:14:in `run'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:589:in `block (3 levels) in execute_run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:32:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/lib/actions/middleware/remote_action.rb:16:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/progress.rb:31:in `with_progress_calculation'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action/progress.rb:17:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/load_setting_values.rb:20:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:32:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/app/lib/actions/middleware/keep_current_user.rb:15:in `run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:588:in `block (2 levels) in execute_run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:587:in `catch'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:587:in `block in execute_run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `block in with_error_handling'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `catch'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `with_error_handling'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:582:in `execute_run'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:303:in `execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/director.rb:94:in `execute'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors.rb:18:in `run_user_code'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform'
 51d128e3 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform'
 51d128e3 | [ sidekiq ]
 51d128e3 | [ concurrent-ruby ]
2024-08-07T15:50:47 [I|aud|51d128e3] Katello::Repository (123) update event on publication_href /pulp/api/v3/publications/python/pypi/01912d1a-d175-7645-b9ef-e68f940c3000/, /pulp/api/v3/publications/python/pypi/01912d1b-3d2b-7272-92e7-135307814490/
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: , execution_plan_id: 11ab75ac-bc7a-42f1-a9e2-4be20fa3c9db} state changed: pending 
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: Actions::Katello::Repository::CapsuleSync, id: 975c5633-b90b-47c4-a356-0d0a946d4b3c, execution_plan_id: 11ab75ac-bc7a-42f1-a9e2-4be20fa3c9db} state changed: planning 
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: Actions::Katello::Repository::CapsuleSync, id: 975c5633-b90b-47c4-a356-0d0a946d4b3c, execution_plan_id: 11ab75ac-bc7a-42f1-a9e2-4be20fa3c9db} state changed: planned 
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: Actions::Katello::Repository::CapsuleSync, id: 975c5633-b90b-47c4-a356-0d0a946d4b3c, execution_plan_id: 11ab75ac-bc7a-42f1-a9e2-4be20fa3c9db} state changed: running 
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: Actions::Katello::Repository::CapsuleSync, id: 975c5633-b90b-47c4-a356-0d0a946d4b3c, execution_plan_id: 11ab75ac-bc7a-42f1-a9e2-4be20fa3c9db} state changed: stopped  result: success
2024-08-07T15:50:48 [I|bac|51d128e3] Task {label: Actions::Katello::Repository::UploadFiles, id: 6ed03a4c-da04-4999-9733-5eaebce31dc2, execution_plan_id: a609fef8-c46d-4250-8555-34aefedd8296} state changed: stopped  result: warning
2024-08-07T15:50:49 [E|app|51d128e3] ForemanTasks::TaskError: Task 6ed03a4c-da04-4999-9733-5eaebce31dc2: Katello::Errors::Pulp3Error: null value in column "version" violates not-null constraint
 51d128e3 | DETAIL:  Failing row contains (01912d1b-33c0-7f60-96f8-5b407c22a948, apache_airflow-2.9.3-py3-none-any.whl, bdist_wheel, , null, 2.3, , <!--
 51d128e3 | Licensed to the Apache Software Foundation (ASF) under one
 51d128e3 | ..., , , , , , , , , , , , , "[]", "[]", "[]", "[]", "[]", , 4a36cb5dbd9925448ef171b72f2db0656121383e16306eded723331963d169db, , "{}").
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/lib/foreman_tasks.rb:56:in `block in sync_task'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/lib/foreman_tasks.rb:55:in `tap'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/lib/foreman_tasks.rb:55:in `sync_task'
 51d128e3 | /usr/share/gems/gems/foreman-tasks-9.0.4/lib/foreman_tasks/triggers.rb:22:in `sync_task'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/controllers/katello/api/v2/repositories_controller.rb:467:in `upload_content'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:228:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rendering.rb:30:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 51d128e3 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 51d128e3 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 51d128e3 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 51d128e3 | /usr/share/gems/gems/audited-5.4.2/lib/audited/sweeper.rb:16:in `around'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 51d128e3 | /usr/share/gems/gems/audited-5.4.2/lib/audited/sweeper.rb:16:in `around'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in `run_callbacks'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:41:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rescue.rb:22:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `block in instrument'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `instrument'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
 51d128e3 | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/app/controllers/katello/concerns/api/api_controller.rb:46:in `process_action'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:165:in `process'
 51d128e3 | /usr/share/gems/gems/actionview-6.1.7.8/lib/action_view/rendering.rb:39:in `process'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:190:in `dispatch'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:254:in `dispatch'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `each'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in `call'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in `call'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `public_send'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `method_missing'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `each'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `serve'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in `call'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/lib/katello/middleware/event_daemon.rb:10:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/apipie-dsl-2.6.1/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 51d128e3 | /usr/share/gems/gems/apipie-rails-1.2.3/lib/apipie/static_dispatcher.rb:68:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
 51d128e3 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
 51d128e3 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 51d128e3 | /usr/share/gems/gems/apipie-rails-1.2.3/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/tempfile_reaper.rb:15:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/etag.rb:27:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/conditional_get.rb:40:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
 51d128e3 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:266:in `context'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:260:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/cookies.rb:697:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:98:in `run_callbacks'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:37:in `call_app'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:28:in `call'
 51d128e3 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 51d128e3 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 51d128e3 | /usr/share/gems/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/request_id.rb:26:in `call'
 51d128e3 | /usr/share/gems/gems/katello-4.11.1/lib/katello/prevent_json_parsing.rb:12:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/runtime.rb:22:in `call'
 51d128e3 | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/executor.rb:14:in `call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/sendfile.rb:110:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/ssl.rb:77:in `call'
 51d128e3 | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
 51d128e3 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in `call'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `public_send'
 51d128e3 | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `method_missing'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:74:in `block in call'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `each'
 51d128e3 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `call'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/configuration.rb:272:in `call'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/request.rb:100:in `block in handle_request'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/request.rb:99:in `handle_request'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/server.rb:443:in `process_client'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/server.rb:241:in `block in run'
 51d128e3 | /usr/share/gems/gems/puma-6.4.0/lib/puma/thread_pool.rb:155:in `block in spawn_thread'
 51d128e3 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2024-08-07T15:50:49 [I|app|51d128e3] Completed 500 Internal Server Error in 43677ms (Views: 0.3ms | ActiveRecord: 131.0ms | Allocations: 136357)

I also tried installing this package locally which works just fine:

$ podman run --rm -it -v  ./:/data/:Z almalinux:8.10

# cd /data/
# dnf install -y python3.12-pip
# pip3.12 install ./apache_airflow-2.9.3-py3-none-any.whl 

I can retest uploading to Foreman 3.11/Katello 4.13 next week. But because it seems to be a valid Python package, I will ping @dralley

urllib3-2.2.2-py3-none-any.whl - the same problem.

@maximilian Katello 4.11 uses Pulpcore 3.39 and pulp-python 3.10.0, is this reproducible with the latest bits on Katello 4.13?

Does someone mind making an issue here and following up with the Pulp team? This looks like a Pulp issue. Issues · pulp/pulp_python · GitHub

Very curious if this is still an issue on Katello 4.13.

There is a problem with many packages, the next ones:
fsspec-2024.6.1-py3-none-any.whl
httpcore-1.0.5-py3-none-any.whl

Can katello 4.11 pulp_python be bumped to 3.11? We don’t support the 3.10 branch, and 3.11 still supports pulpcore 3.39. I have identified the issue and we can backport the fix to the 3.11 branch. [0]

[0] Support Metadata 2.3 | update version of pkginfo · Issue #682 · pulp/pulp_python · GitHub

I have reproduced this issue on Foreman 3.11/Katello 4.13/pulpcore 3.49/pulp_python 3.11.1 and opened an issue on pulp_python: Cannot upload package without version · Issue #723 · pulp/pulp_python · GitHub

pulp_python 3.11.3 has been released with the fix for new metadata 2.3 uploads.

2 Likes

Thank you. I’m waiting for the rpm release.

Hi.
When will the pulp_python-3.11.3 rpm be released. Is this a question for this forum ?

We can’t officially bump pulp_python for Katello 4.11 because it may be incompatible with the current client bindings. To fully get it bumped we’d need to do a new release, which we can’t do since the Katello version is now out of support.

However, there’s a pretty decent chance that installing https://yum.theforeman.org/pulpcore/3.49/el8/x86_64/python3.11-pulp-python-3.11.3-1.el8.noarch.rpm on your 4.11 machine should work. You’d just need to restart services and run the pulpcore migrations manually:

sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py'  /usr/bin/pulpcore-manager migrate

If you do this, I’d just recommend to take a full backup just in case there’s a surprise incompatibility.

Thank you, it works.

1 Like