Skip to content

Drop unneeded fetch-depth: 0 from two workflows#9489

Merged
alokedesai merged 3 commits intowarpdotdev:masterfrom
sebryu:ci/drop-unneeded-fetch-depth
May 5, 2026
Merged

Drop unneeded fetch-depth: 0 from two workflows#9489
alokedesai merged 3 commits intowarpdotdev:masterfrom
sebryu:ci/drop-unneeded-fetch-depth

Conversation

@sebryu
Copy link
Copy Markdown
Contributor

@sebryu sebryu commented Apr 29, 2026

Summary

Two workflow checkouts request the full repo history via fetch-depth: 0 but never use it. Falling back to the default shallow clone speeds them up at no behavioral cost.

Analysis

I scanned every fetch-depth: 0 site in .github/:

Site Why set Needed?
check_approvals.yml:19 git merge-base + git diff between base/head Yes — merge-base across long-lived branches needs deep history. Already mitigated with filter: blob:none.
create_release.yml:1623 Feeds warpdotdev/generate-changelog Yes — changelog walks tag history.
feature_flag_cleanup.yml:30 (analyze) Agent prompt instructs git blame of Cargo.toml Yes — blame needs full history.
feature_flag_cleanup.yml:161 (cleanup) None — agent prompt only says "clean up references" / "remove from enum" / "modify code" No — removed
feature_flag_cleanup.yml:218 (create_pr) Applies a patch then runs peter-evans/create-pull-request Probably no, but kept conservative — peter-evans only requires deep history when it must include prior local commits. Worth a follow-up.
delete_release.yml:95 Job only does git push HEAD:refs/heads/<new> then git push --delete <old> No — removed

Changes

  • feature_flag_cleanup.yml — removed fetch-depth: 0 from the cleanup job. The Oz agent edits source files at HEAD; no git history operations occur in the prompt.
  • delete_release.yml — removed fetch-depth: 0 from the delete job. Renaming a branch is two server-side pushes; only the tip commit is needed.

Test plan

  • CI passes on this PR.
  • Next nightly run of feature_flag_cleanup.yml succeeds end-to-end (analyze → cleanup → create_pr).
  • Next manual delete_release.yml invocation succeeds (rename + delete).

The cleanup job in feature_flag_cleanup.yml only edits source files at
HEAD; the agent prompt does not reference git history. The delete-release
job in delete_release.yml only pushes HEAD to a renamed ref and deletes
the old branch server-side. Neither needs the full repo history that
fetch-depth: 0 forces.

Removing it falls back to the action's default shallow clone, cutting
checkout time on the warp repo without changing behavior.
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@sebryu

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @alokedesai. I left feedback as a comment so a maintainer can approve.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR removes fetch-depth: 0 from two GitHub Actions checkout steps where the changed jobs only need the checked-out commit rather than full repository history.

Concerns

  • No blocking concerns found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from alokedesai April 29, 2026 20:58
@captainsafia captainsafia added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Apr 30, 2026 — with Warp Dev Github Integration
uses: namespacelabs/nscloud-checkout-action@938f5d2d403d6224d9a0c0dc559b1dae09c2ede4 # v8.1.1
with:
ref: ${{ needs.analyze.outputs.analyzed_sha }}
fetch-depth: 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this one is necessary in order for the agent to run git blame

Copy link
Copy Markdown
Member

@alokedesai alokedesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! I'd prefer if we kept fetch-depth for feature_flag_cleanup.yml but I support removing it for delete_release.yml

Per @alokedesai, restore fetch-depth: 0 on the cleanup job since the
agent may inspect history. Also drop it from the create_pr job, where
peter-evans/create-pull-request only needs the checked-out commit to
apply the patch and push a new branch.
@sebryu
Copy link
Copy Markdown
Contributor Author

sebryu commented May 5, 2026

Thanks @alokedesai — agreed. Restored fetch-depth: 0 on the cleanup job so the agent can still walk history if it decides to.

While I was in there, I also dropped fetch-depth: 0 from the create_pr job (the third checkout in the same workflow). That job only:

  1. Checks out at analyzed_sha
  2. Applies the cleanup patch from the artifact
  3. Hands the dirty working tree to peter-evans/create-pull-request, which makes one commit on top of HEAD and pushes a new branch

No history walk anywhere — peter-evans/create-pull-request works fine with a shallow clone since it only commits + pushes from the tip. Happy to revert if you'd rather keep this PR scoped to just delete_release.yml.

@alokedesai
Copy link
Copy Markdown
Member

Thanks! Could we keep isolated to just delete_release.yml for now?

Restore fetch-depth: 0 in feature_flag_cleanup.yml to keep this PR
isolated to delete_release.yml as requested in review.
@sebryu
Copy link
Copy Markdown
Contributor Author

sebryu commented May 5, 2026

Done — reverted the feature_flag_cleanup.yml change in 3bd890d. PR is now scoped to delete_release.yml only.

Copy link
Copy Markdown
Member

@alokedesai alokedesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alokedesai alokedesai merged commit 957783b into warpdotdev:master May 5, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants