Project

Profile

Help

Issue #9101

closed

Content_artifact is not updated

Added by ppicka almost 3 years ago. Updated over 2 years ago.

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

Description

When content is created with "on_demand" policy (only remote artifacts) and then is the same content synced with 'immediate' policy (artifact downloaded) content_artifact.artifact of that content is not updated.

Looks QueryExistingContent stage should check this update.

Reproducer script:

#!/usr/bin/env bash

export REPO1=$(head /dev/urandom | tr -dc a-z | head -c5)
export REPO2=$(head /dev/urandom | tr -dc a-z | head -c5)
export REMOTE1=$(head /dev/urandom | tr -dc a-z | head -c5)
export REMOTE2=$(head /dev/urandom | tr -dc a-z | head -c5)


# sync content on_demand
pulp file repository create --name $REPO1
pulp file remote create --name $REMOTE1 \
    --url 'https://fixtures.pulpproject.org/file/PULP_MANIFEST' \
    --policy 'on_demand'

pulp file repository sync --name $REPO1 --remote $REMOTE1

export ADDED=$(pulp file repository version show --repository $REPO1 --version 1 | \
jq -r '.content_summary | .added | ."file.file" | .href')

http :24817${ADDED}
echo "here are no checksums as only remote artifacts are present"
echo "press [enter] to continue"
read

# sync same content immediate
pulp file repository create --name $REPO2
pulp file remote create --name $REMOTE2 \
    --url 'https://fixtures.pulpproject.org/file/PULP_MANIFEST' \
    --policy 'immediate'

pulp file repository sync --name $REPO2 --remote $REMOTE2

export ADDED=$(pulp file repository version show --repository $REPO2 --version 1 | \
jq -r '.content_summary | .added | ."file.file" | .href')

http :24817${ADDED}
echo "as artifacts downloaded checksums should be visible "
echo "if you check in django shell or db, content_artifacts does not have updated 'artifact' relation"

Files


Related issues

Related to Pulp - Issue #8305: Deleting a remote used as source for live content corrupts ContentArtifact recordsCLOSED - DUPLICATEActions
Copied to Pulp - Backport #9261: Backport #9101 "Content_artifact is not updated" to 3.14.zCLOSED - CURRENTRELEASE

Actions

Also available in: Atom PDF