fix: after git clone for remote git actions & workflows, don't immediately git fetch repeating same work #1164

Closed
mfenniak wants to merge 6 commits from mfenniak/forgejo-runner:fix-double-fetch-on-repo-init into main
Owner

(Stacked on #1162 -- 78b2252097 is the only relevant commit to this change)

Small optimization for when a repo cache is initialized to not clone then fetch. fetch still occurs usually.

  • bug fixes
    • PR: fix: after git clone for remote git actions & workflows, don't immediately git fetch repeating same work
(Stacked on #1162 -- 78b22520974c547cc23edaab7f6f8a60b784e40b is the only relevant commit to this change) Small optimization for when a repo cache is initialized to not `clone` then `fetch`. `fetch` still occurs usually. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1164): <!--number 1164 --><!--line 0 --><!--description Zml4OiBhZnRlciBgZ2l0IGNsb25lYCBmb3IgcmVtb3RlIGdpdCBhY3Rpb25zICYgd29ya2Zsb3dzLCBkb24ndCBpbW1lZGlhdGVseSBgZ2l0IGZldGNoYCByZXBlYXRpbmcgc2FtZSB3b3Jr-->fix: after `git clone` for remote git actions & workflows, don't immediately `git fetch` repeating same work<!--description--> <!--end release-notes-assistant-->
chore: remove unnecessary Mutexes
All checks were successful
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / validate mocks (pull_request) Successful in 36s
checks / validate pre-commit-hooks file (pull_request) Successful in 35s
checks / build and test (pull_request) Successful in 1m53s
checks / runner exec tests (pull_request) Successful in 29s
checks / integration tests (pull_request) Successful in 9m39s
checks / runner integration tests (pull_request) Successful in 4m20s
cascade / end-to-end (pull_request_target) Successful in 29m48s
dd8e7427cb
fix: don't fetch repo immediately after cloning
Some checks failed
checks / validate pre-commit-hooks file (pull_request) Successful in 33s
checks / validate mocks (pull_request) Successful in 46s
checks / build and test (pull_request) Failing after 1m48s
checks / runner exec tests (pull_request) Has been skipped
checks / runner integration tests (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / integration tests (pull_request) Successful in 8m44s
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Successful in 1m9s
cascade / end-to-end (pull_request_target) Successful in 31m0s
78b2252097
Contributor

cascading-pr updated at actions/setup-forgejo#766

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/766
mfenniak changed title from fix: after git clone is successful, don't immediately git fetch repeating same work to fix: after git clone is successful for a step/reusable workflow, don't immediately git fetch repeating same work 2025-11-19 21:50:54 +00:00
mfenniak changed title from fix: after git clone is successful for a step/reusable workflow, don't immediately git fetch repeating same work to fix: after git clone for remote git actions & workflows, don't immediately git fetch repeating same work 2025-11-19 21:51:25 +00:00
Author
Owner

Needs revision (if possible) as the fetch provides value in getting the non-default-branch references from the remote, even just after the clone.

Needs revision (if possible) as the fetch provides value in getting the non-default-branch references from the remote, even just after the clone.
mfenniak closed this pull request 2025-11-19 22:13:26 +00:00
Some checks are pending
checks / validate pre-commit-hooks file (pull_request) Successful in 33s
checks / validate mocks (pull_request) Successful in 46s
checks / build and test (pull_request) Failing after 1m48s
checks / runner exec tests (pull_request) Has been skipped
Required
Details
checks / runner integration tests (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / integration tests (pull_request) Successful in 8m44s
cascade / debug (pull_request_target) Has been skipped
Required
Details
cascade / forgejo (pull_request_target) Successful in 1m9s
Required
Details
cascade / end-to-end (pull_request_target) Successful in 31m0s
Required
Details
checks / Build Forgejo Runner *
Required
checks / Run integration tests with *
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1164
No description provided.