Project

Profile

Help

Issue #8380

closed

Advisory-upload fails with traceback

Added by ggainey almost 4 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 92
Quarter:

Description

Reproducer:

  • pulp rpm repository create --name zoo
  • pulp rpm remote create --name zoo --url https://fixtures.pulpproject.org/rpm-updated-updateinfo/
  • pulp rpm repository sync --name zoo --remote zoo
  • http -f POST :/pulp/api/v3/content/rpm/advisories/ file@(bear-advisory-from-attached) repository=(repo-href-from-above)

Task fails with the following:


{
    "child_tasks": [],
    "created_resources": [
        "/pulp/api/v3/repositories/rpm/rpm/2503e7fa-2cd3-4185-b0c0-09122e65442e/versions/3/"
    ],
    "error": {
        "description": "null value in column \"update_record_id\" violates not-null constraint\nDETAIL:  Failing row contains (b6b275f6-3bc2-4494-a3dd-7259d09cf393, 2021-03-10 21:20:02.767696+00, 2021-03-10 21:20:02.767804+00, null, , null, null).\n",
        "traceback": "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 975, in perform_job
    rv = job.perform()
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 696, in perform
    self._result = self._execute()
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 719, in _execute
    return self.func(*self.args, **self.kwargs)
  File \"/home/vagrant/devel/pulpcore/pulpcore/app/tasks/base.py\", line 18, in general_create_from_temp_file
    general_create(app_label, serializer_name, data=data, *args, **kwargs)
  File \"/home/vagrant/devel/pulpcore/pulpcore/app/tasks/base.py\", line 35, in general_create
    serializer.save()
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py\", line 205, in save
    self.instance = self.create(validated_data)
  File \"/home/vagrant/devel/pulp_rpm/pulp_rpm/app/serializers/advisory.py\", line 137, in create 
    coll.save()
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django_lifecycle/mixins.py\", line 133, in save
    save(*args, **kwargs) 
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 744, in save
    force_update=force_update, update_fields=update_fields)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 782, in save_base
    force_update, using, update_fields,
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 873, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py\", line 911, in _do_insert
    using=using, raw=raw)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/manager.py\", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\", line 1186, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\", line 1377, in execute_sql
    cursor.execute(sql, params)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute
    return self.cursor.execute(sql, params)
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/utils.py\", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute
    return self.cursor.execute(sql, params)
"
    },
    "finished_at": "2021-03-10T21:20:16.487089Z",
    "logging_cid": "c493aec9ecc64cda9425e34f288b8c47",
    "name": "pulpcore.app.tasks.base.general_create_from_temp_file",
    "parent_task": null,
    "progress_reports": [],
    "pulp_created": "2021-03-10T21:18:20.412692Z",
    "pulp_href": "/pulp/api/v3/tasks/920f396a-16d5-4c15-bf18-154708080b8b/",
    "reserved_resources_record": [
        "/pulp/api/v3/repositories/rpm/rpm/2503e7fa-2cd3-4185-b0c0-09122e65442e/"
    ],
    "started_at": "2021-03-10T21:18:20.539067Z",
    "state": "failed",
    "task_group": null,
    "worker": "/pulp/api/v3/workers/d433f22e-90da-41b8-ab73-1cf094737e2c/"
}

Files

bear_advisory (727 Bytes) bear_advisory ggainey, 03/10/2021 10:52 PM
Actions #1

Updated by pulpbot almost 4 years ago

  • Status changed from ASSIGNED to POST

Added by ggainey almost 4 years ago

Revision b7058385 | View on GitHub

Fixed a regression in uploading advisories with pkglists.

fixes #8380

Actions #2

Updated by ggainey almost 4 years ago

  • Status changed from POST to MODIFIED
Actions #3

Updated by ggainey almost 4 years ago

  • Sprint set to Sprint 92
Actions #4

Updated by dalley over 3 years ago

  • Sprint/Milestone set to 3.10.0
Actions #5

Updated by dalley over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF