Issue #3425
closedPath on content unit doesn't seem to do anything
Description
When you create a content unit:
https://github.com/pulp/pulp_file#create-file-content-from-an-artifact
You set the relative_path via the artifacts dict on the ContentArtifact here:
https://github.com/pulp/pulp/blob/3.0-dev/pulpcore/pulpcore/app/viewsets/content.py#L57-L59
See the model here:
https://github.com/pulp/pulp/blob/3.0-dev/pulpcore/pulpcore/app/models/content.py#L139
This relative_path field is what the publishing code uses:
As well as the manifest code:
AFAICT, the path field on FileContent isn't used at all.
Related issues
Updated by daviddavis almost 7 years ago
- Related to Issue #3410: Rename content field "path" to "relative_path" added
Updated by daviddavis almost 7 years ago
To further illustrate this, suppose I upload file test.tar.gz
and then create a content unit with:
{
"digest": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
"path": "foo.tar.gz",
"artifacts": {"bar.tar.gz":"http://localhost:8000/api/v3/artifacts/7d39e3f6-535a-4b6e-81e9-c83aa56aa19e/"}
}
The publishing code serves this unit at the ContentArtifact.relative_path of bar.tar.gz
.
Updated by jortel@redhat.com almost 7 years ago
The path is part of the FileContent natural key (unit key) and supports uniqueness.
Updated by daviddavis almost 7 years ago
- Status changed from NEW to CLOSED - DUPLICATE
Updated by daviddavis almost 7 years ago
- Is duplicate of Task #3428: Update content unit creation so it takes only a relative_path and artifact href added