Skip to content

Fix artifact-prefixed uploads with empty media root - #8286

Draft
dralley wants to merge 1 commit into
pulp:mainfrom
dralley:fix-artifact-upload-empty-media-root-8041
Draft

dralley wants to merge 1 commit into
pulp:mainfrom
dralley:fix-artifact-upload-empty-media-root-8041

Conversation

@dralley

@dralley dralley commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allow fresh artifact uploads whose filenames begin with artifact when MEDIA_ROOT is empty.
  • Resolve committed file paths through the active storage backend and match the artifact/ directory boundary.
  • Add API and focused storage regression tests.

Closes #8041

Tests

  • oci-env test -p pulpcore unit -k test_artifact_file_field_with_empty_media_root (5 passed)
  • oci-env test -p pulpcore functional -k test_upload_artifact_prefixed_filename (1 passed)
  • oci-env test -p pulpcore unit -k 'test_create_read_delete_content or test_read_temp_file or test_storage_location' (3 passed)
  • ruff check and ruff format --check on the changed Python files

AI assistance is disclosed in the commit message.

Check committed files against the active storage path and artifact directory boundary so fresh uploads keep their client filenames.

Closes pulp#8041

Assisted By: Codex

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PULP-2502] ArtifactFileField.pre_save spuriously rejects uploads named 'artifact*' when MEDIA_ROOT is empty

1 participant