Project

Profile

Help

Issue #9580

closed

Artifact() got an unexpected keyword argument 'sha'

Added by ttereshc over 2 years ago. Updated about 2 years ago.

Status:
CLOSED - DUPLICATE
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:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_rpm/2319":https://github.com/pulp/pulp_rpm/issues/2319


From https://projects.theforeman.org/issues/33216:

I recently ran into an issue while trying to sync a rhel 6.2 repo to my foreman server:

Artifact() got an unexpected keyword argument 'sha'

I saw a similar post here: https://projects.theforeman.org/issues/31559

The issue is marked as resolved for katello 3.18, yet I'm still having it with katello 4.1 and foreman 2.5.2

The error is as follow:

error"=>
     {"traceback"=>
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 266, in _perform_task\n" +
       "    result = func(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 422, in synchronize\n" +
       "    version = dv.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/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 705, in run\n" +
       "    await self.parse_repository_metadata(repomd, repomd_files, file_extension)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 800, in parse_repository_metadata\n" +
       "    artifact=Artifact(**file_data),\n" +
       "  File \"/usr/lib/python3.6/site-packages/django_lifecycle/mixins.py\", line 25, in __init__\n" +
       "    super().__init__(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/django/db/models/base.py\", line 501, in __init__\n" +
       "    raise TypeError(\"%s() got an unexpected keyword argument '%s'\" % (cls.__name__, kwarg))\n",
      "description"=>"Artifact() got an unexpected keyword argument 'sha'"},

Related issues

Related to RPM Support - Issue #8052: Some repositories cannot be synchronized with error: Artifact() got an unexpected keyword argument 'sha'CLOSED - CURRENTRELEASEggaineyActions
Copied to RPM Support - Backport #9624: Backport #9580 "Artifact() got an unexpected keyword argument 'sha'" to 3.16.zCLOSED - CURRENTRELEASEdalley

Actions
Copied to RPM Support - Backport #9625: Backport #9580 "Artifact() got an unexpected keyword argument 'sha'" to 3.14.zCLOSED - CURRENTRELEASEdalley

Actions
Actions #1

Updated by ttereshc over 2 years ago

  • Description updated (diff)
Actions #2

Updated by ttereshc over 2 years ago

  • Related to Issue #8052: Some repositories cannot be synchronized with error: Artifact() got an unexpected keyword argument 'sha' added
Actions #3

Updated by ggainey over 2 years ago

Reproduced on core/master with the following script (assumes CDN_* env-variables are set with redhat cert info)

pulp rpm remote create --name r6 --url https://cdn.redhat.com/content/dist/rhel/server/6/6.1/x86_64/os --policy on_demand \
  --ca-cert $CDN_CA_CERT --client-key $CDN_CLIENT_KEY --client-cert $CDN_CLIENT_CERT
pulp rpm remote create --name r6 --url https://cdn.redhat.com/content/dist/rhel/server/6/6.1/x86_64/os --policy on_demand \
  --ca-cert "$CDN_CA_CERT" --client-key "$CDN_CLIENT_KEY" --client-cert "$CDN_CLIENT_CERT"
pulp rpm repository create --name r6 --remote r6
pulp rpm repository sync --name r6
Started background task /pulp/api/v3/tasks/a138c85b-bbc9-406c-a65b-f625ecd8f6dd/
...................................Error: Task /pulp/api/v3/tasks/a138c85b-bbc9-406c-a65b-f625ecd8f6dd/ failed: 'Artifact() got an unexpected keyword argument 'sha''

#8052 fixed this, looks like something un-fixed it. Investigating.

Actions #4

Updated by pulpbot over 2 years ago

  • Status changed from NEW to POST

Added by ggainey over 2 years ago

Revision 3df6a5e0 | View on GitHub

Fixed 'sha'-using repos by teaching one more place to normalize checksum-type.

Test coverage is:

$ export FIPS_WORKFLOW=true
$ export CDN_CLIENT_CERT=`cat /PATH/TO/YOUR/cdn.crt`
$ export CDN_CLIENT_KEY=`cat /PATH/TO/YOUR/cdn.key`
$ export CDN_CA_CERT=`cat /PATH/TO/YOUR/redhat-uep.pem`
$ pulpcore-manager test pulp_rpm.tests.functional.api.test_fips_workflow.FipsRemotesTestCase.test_077_cdn_redhat_com_content_dist_rhel_server_6_6_6_x86_64_os

fixes #9580 [nocoverage]

Actions #5

Updated by ggainey over 2 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by dalley over 2 years ago

  • Assignee set to ggainey
Actions #8

Updated by dalley over 2 years ago

  • Copied to Backport #9624: Backport #9580 "Artifact() got an unexpected keyword argument 'sha'" to 3.16.z added
Actions #9

Updated by dalley over 2 years ago

  • Copied to Backport #9625: Backport #9580 "Artifact() got an unexpected keyword argument 'sha'" to 3.14.z added
Actions #10

Updated by fao89 about 2 years ago

  • Description updated (diff)
  • Status changed from MODIFIED to CLOSED - DUPLICATE

Also available in: Atom PDF