Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizing up-to-date on bigger repos to not require fetch-depth 0 #99

Open
pmalek opened this issue Mar 19, 2024 · 0 comments
Open

Optimizing up-to-date on bigger repos to not require fetch-depth 0 #99

pmalek opened this issue Mar 19, 2024 · 0 comments

Comments

@pmalek
Copy link
Member

pmalek commented Mar 19, 2024

Problem statement

https://github.com/Kong/public-shared-actions/tree/main/pr-previews#up-to-date seems to require fetch-depth 0 which in turn causes long check outs in bigger repos.

For instance, in KIC's repo a check out is already over a minute: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/8342150986/job/22829697425#step:2:335.

Taking into account that this is going to only grow with time I believe it's worth considering how the above can be optimized.

We've tried to use the default (1) fetch-depth https://github.com/Kong/kubernetes-ingress-controller/pull/5718/files#diff-4af11422a4987e947e5a47adead7a30d32cdb2db82e2d3fe36f8e6cbe84d5ac5L30-L31 but that failed and we needed to revert that change.

What did you observe

We either got:

Run # if a request error occurred or no pull request info was returned, skip logic and return false
From https://github.com/Kong/kubernetes-ingress-controller
 * branch            main       -> FETCH_HEAD
From https://github.com/Kong/kubernetes-ingress-controller
 * branch              b70a95c8ff9743831d4b1c1833b0c080f0443085 -> FETCH_HEAD
fatal: ambiguous argument 'origin/main~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: Process completed with exit code 128.

or

From https://github.com/Kong/kubernetes-ingress-controller
 * branch            main       -> FETCH_HEAD
From https://github.com/Kong/kubernetes-ingress-controller
 * branch              980081dc7abe9bcc93a16622109ca07ab6e27d0e -> FETCH_HEAD
Error: Process completed with exit code 1.
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

No branches or pull requests

1 participant