pulp / pulp/pulp_deb

nvidia repos failing on re-sync - Error: Task failed: ''NoneType' object has no attribute 'artifact_set_sha256''

Open
#1,370 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.bugfix Looking_for_Contributor
Dominant language
Python
Stars
71
Forks
91
Avg merge
1d 19h
Merged PRs (30d)
22

Description

Version
pulpcore 3.89.1
pulp_deb 3.7.0
Installed via container: quay.io/pulp/pulp:3.89.1

Describe the bug
Repeated syncs of the nvidia cuda repos fail with 'NoneType' object has no attribute 'artifact_set_sha256''

To Reproduce

Create the repo:

NAME="nvidia-cuda-24.04-amd64"
pulp deb remote create --name=$NAME --url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/" --distribution /
pulp deb repository create --name=$NAME --remote=$NAME
pulp deb repository sync --name=$NAME
PUB_HREF=$(pulp deb publication -t verbatim create --repository=$NAME | jq -r '.pulp_href')
pulp deb distribution create --name=${NAME}-bimonthly --base-path=${NAME}-bimonthly --publication $PUB_HREF

Note that the /pulp/content/$NAME/Packages file exists

Re-run a sync:

pulp deb repository sync --name=$NAME 
PUB_HREF=$(pulp deb publication -t verbatim create --repository=$NAME | jq -r '.pulp_href')
pulp deb distribution update --name=${NAME}-bimonthly --base-path=${NAME}-bimonthly --publication $PUB_HREF

Note that /pulp/content/$NAME/Packages has disappeared.

Re-run the sync pulp deb repository sync --name=$NAME and get the sync fail with 'NoneType' object has no attribute 'artifact_set_sha256''

Expected behavior
A new sync/publication/distribution update would not delete the Packages file and would complete successfully.

Additional context
Re-doing the sync as

pulp deb repository sync --name=$NAME --no-optimize

makes the repository usable again until the next sync happens that does not use --no-optimize

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the provided Pulp CLI commands against the listed pulpcore and pulp_deb versions, comparing a normal sync with one using --no-optimize. Trace the optimized re-sync and publication flow that removes Packages and later raises the NoneType error; done means repeated sync, publication, and distribution updates complete successfully without deleting Packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.