Skip to content

Fix bundle_artifacts to honor Overrides.toml#1089

Open
asinghvi17 wants to merge 1 commit intoJuliaLang:kc/distrofrom
asinghvi17:as/fix-artifact-override-bundling
Open

Fix bundle_artifacts to honor Overrides.toml#1089
asinghvi17 wants to merge 1 commit intoJuliaLang:kc/distrofrom
asinghvi17:as/fix-artifact-override-bundling

Conversation

@asinghvi17
Copy link
Copy Markdown
Contributor

Summary

  • Fix bundle_artifacts to correctly bundle overridden artifacts from Overrides.toml
  • Two bugs fixed: UUID-based overrides were never processed (missing pkg_uuid kwarg), and the copy loop used basename(artifact_path) instead of the known hash (so overridden paths like /tmp/bzip2_override produced wrong directory names)
  • Add a targeted test that sets up a UUID-based override with a marker file and verifies the overridden content is bundled under the correct hash

Test plan

  • New "bundle_artifacts with overrides" testset passes in isolation (~2 min)
  • Manual end-to-end verification: built a distribution with Bzip2_jll overridden via Overrides.toml, confirmed OVERRIDE_MARKER present in bundled artifacts and accessible at runtime

🤖 Generated with Claude Code

bundle_artifacts had two bugs that caused it to ignore artifact overrides:

1. UUID-based overrides were never processed because _collect_artifacts
   and bundle_artifacts called select_downloadable_artifacts without
   pkg_uuid, so process_overrides was never invoked to convert UUID-based
   entries into hash lookups.

2. The copy loop used basename(artifact_path) as the destination directory
   name. For overridden artifacts the path is something like
   /tmp/bzip2_override, so basename gives "bzip2_override" instead of the
   hash. The distribution's Artifacts.toml still references the original
   hash, so the artifact wasn't found at runtime.

Fix by:
- Threading pkg_uuid through _collect_artifacts and bundle_artifacts
- Storing the artifact hash alongside the resolved path and using it
  directly in the copy loop instead of basename

Add a test that sets up a UUID-based override with a marker file and
verifies bundle_artifacts copies the overridden content under the correct
hash directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant