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

Insufficient repository fetch-depth for action workflows #108

Closed
svengreb opened this issue Nov 21, 2021 · 0 comments · Fixed by #109
Closed

Insufficient repository fetch-depth for action workflows #108

svengreb opened this issue Nov 21, 2021 · 0 comments · Fixed by #109

Comments

@svengreb
Copy link
Owner

svengreb commented Nov 21, 2021

The GitHub action workflows using the actions/checkout action to fetch the repository that triggered the workflow. However, by default only the history of the latest commit is fetched which results in errors when wand tries to extract repository metadata information like the amount of commits ahead of the latest commit. As an example this can be seen when running the bootstrap command in the test job of the ci-go workflow which fails with an object not found error because the history only contains a single commit.

To fix this problem action/checkout provides an option to fetch all history for all tags and branches which will be used to prevent errors like this in the pipeline.

@svengreb svengreb added this to the Next milestone Nov 21, 2021
@svengreb svengreb self-assigned this Nov 21, 2021
svengreb added a commit that referenced this issue Nov 21, 2021
The GitHub action workflows [1] using the `actions/checkout` action [2]
to fetch the repository that triggered the workflow. However, by default
only the history of the latest commit was fetched which resulted in
errors when wand tried to extract repository metadata information like
the amount of commits ahead of the latest commit. As an example this
can be seen when running the `bootstrap` command in the `test` job of
the `ci-go` workflow [5] which failed with an `object not found` error
because the history only contains a single commit.

To fix this problem `action/checkout` provides an option to fetch all
history for all tags and branches [3] which is now used to prevent
errors like this in the pipeline.

[1]: https://github.com/svengreb/wand/tree/9caf10f9d3b0c97e1f6c18b29c175e71764b0ece/.github/workflows
[2]: https://github.com/actions/checkout
[3]: https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches
[4]: https://github.com/svengreb/wand/blob/cabd635c4ec73680b1776e7c536feca16643b00b/magefile.go#L136
[5]: https://github.com/svengreb/wand/runs/4275275079?check_suite_focus=true

GH-108
svengreb added a commit that referenced this issue Nov 21, 2021
The GitHub action workflows [1] using the `actions/checkout` action [2]
to fetch the repository that triggered the workflow. However, by default
only the history of the latest commit was fetched which resulted in
errors when wand tried to extract repository metadata information like
the amount of commits ahead of the latest commit. As an example this
can be seen when running the `bootstrap` command in the `test` job of
the `ci-go` workflow [5] which failed with an `object not found` error
because the history only contains a single commit.

To fix this problem `action/checkout` provides an option to fetch all
history for all tags and branches [3] which is now used to prevent
errors like this in the pipeline.

[1]: https://github.com/svengreb/wand/tree/9caf10f9d3b0c97e1f6c18b29c175e71764b0ece/.github/workflows
[2]: https://github.com/actions/checkout
[3]: https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches
[4]: https://github.com/svengreb/wand/blob/cabd635c4ec73680b1776e7c536feca16643b00b/magefile.go#L136
[5]: https://github.com/svengreb/wand/runs/4275275079?check_suite_focus=true

Closes GH-108
@svengreb svengreb removed their assignment Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant