refactor(executor): simplify registry artifact selection - #3265
refactor(executor): simplify registry artifact selection#3265daryllimyt wants to merge 8 commits into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to c604ea0. Security Overview
Detected Code Changes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de22908095
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if cached_paths := artifact.cached_path(ctx): | ||
| return cached_paths |
There was a problem hiding this comment.
Recheck all local representations after artifact selection
When another cache instance finishes a legacy tarball extraction while this instance awaits _sidecar_exists(), this post-selection check considers only the selected SquashFS artifact. The valid tarball that appeared after the earlier _locally_cached_path() check is therefore ignored, causing a redundant SquashFS download/extraction and potentially a capacity or tool-availability failure despite an immediately reusable cache entry. Recheck _locally_cached_path(ctx, artifact_uri) here so the cross-instance race preserves the new legacy-cache compatibility behavior.
Useful? React with 👍 / 👎.
Summary
Make registry artifact selection explicit and remove the dead gzip fallback for current SquashFS artifacts.
What changed
Validation
uv run pytest --confcutdir=tests/unit tests/unit/test_registry_artifacts.py -q— 133 passeduv run pytest --confcutdir=tests/integration tests/integration/test_registry_artifact_cache_mount_lifecycle.py -q— 2 passeduv run ruff check ...uv run ruff format --check ...uv run basedpyright ...LOC breakdown
Stack
PR 4 of 4. Depends on #3264.
Summary by cubic
Simplifies executor registry artifact selection by choosing one artifact up front and removing the unused gzip fallback for modern SquashFS. This makes selection explicit and surfaces real SquashFS failures instead of masking them.
_select_artifactand_materialize_artifact; introduce_build_artifact; remove_first_cached_path; reduce logs to one “Materializing selected registry artifact” line.Written for commit c604ea0. Summary will update on new commits.