Remove partial-clone blob filtering from safe-outputs ref fetches#36260
Conversation
|
Hey A couple of things to address before this is ready for review:
If you'd like a hand completing this, you can assign the following prompt to your coding agent:
|
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the safe-outputs workflow generation so that the “fetch additional refs” step no longer performs a blobless/partial-clone fetch (--filter=blob:none), while still mirroring the checkout’s shallow depth via --depth=<n>. This prevents the safe-outputs job from inadvertently leaving the repository in a partial-clone state that can break later operations requiring blob access.
Changes:
- Remove
--filter=blob:nonefrom the generatedgit fetchcommand used in the safe-outputs “Fetch additional refs” step. - Keep
--depth=<n>behavior to avoid expanding shallow clones during the follow-up ref fetch. - Update workflow-generation tests to assert the fetch step does not emit
--filter=blob:none.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_safe_outputs_steps.go | Removes blob filtering from the safe-outputs additional-ref fetch command while preserving depth mirroring. |
| pkg/workflow/compiler_safe_outputs_steps_test.go | Updates expectations to ensure generated safe-outputs fetch steps do not include --filter=blob:none. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
The safe-outputs push flow was reintroducing
--filter=blob:nonewhen fetching additional refs, leaving the repo in a partial-clone state even though this job needs to check out branches and read blobs reliably. This change keeps the shallow fetch behavior but stops suppressing blob transfer for the follow-up fetch.Fetch behavior
--filter=blob:nonefrom the generatedgit fetchcommand in the safe-outputs ref-fetch step.--depth=<n>so the job still mirrors checkout depth without forcing a full-history fetch.Test coverage
Generated command shape