Skip to content

Use shallow fetch for Go tester build #145

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

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Use shallow fetch for Go tester build #145

merged 1 commit into from
Aug 16, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 16, 2021

The default behavior of the actions/checkout action is to do a shallow fetch of the repository, which is the most efficient if all that's needed is a copy of the repository files. In cases where the repository history is needed, this behavior is not appropriate, and so it can be configured via the fetch-depth input. Setting this input to 0 causes the full history to be fetched.

A full fetch is required for workflows that use the arduino/create-changelog action to generate a raw changelog from the commit history, and so it is found in the "Release" workflow. However, there is no use of the commit history by the "Publish Tester Build" workflow, which does not need a changelog.

The unnecessary full fetch makes the workflow less efficient and more difficult to understand, so it must be removed.


Demo workflow run after this change: https://github.com/per1234/arduino-lint/actions/runs/1133921362

The default behavior of the `actions/checkout` action is to do a shallow fetch of the repository, which is the most
efficient if all that's needed is a copy of the repository files. In cases where the repository history is needed, this
behavior is not appropriate, and so it can be configured via the `fetch-depth` input. Setting this input to 0 causes the
full history to be fetched.

A full fetch is required for workflows that use the `arduino/create-changelog` action to generate a raw changelog from
the commit history, and so it is found in the "Release" workflow. However, there is no use of the commit history by the
"Publish Tester Build" workflow, which does not need a changelog.

The unnecessary full fetch makes the workflow less efficient and more difficult to understand, so it must be removed.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Aug 16, 2021
@per1234 per1234 requested a review from umbynos August 16, 2021 02:34
@per1234 per1234 merged commit 9a71d3f into arduino:main Aug 16, 2021
@per1234 per1234 deleted the superfluous-full-fetch branch August 16, 2021 10:45
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants