-
Notifications
You must be signed in to change notification settings - Fork 23
[CI] Use default checkout depth #438
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
base: dev
Are you sure you want to change the base?
Conversation
.github/workflows/rocm-ci.yml
Outdated
| with: | ||
| submodules: 'recursive' | ||
| fetch-depth: 0 | ||
| fetch-tags: 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is desired result of removing fetch-depth:0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is desired result of removing fetch-depth:0?
I noticed that the checkout stage in CI runs takes a considerable amount of time (highest I've seen is 36+ minutes, e.g. in https://github.com/ROCm/TransformerEngine/actions/runs/21598826002/job/62238786074). Not fetching the full git history (and only fetching the GitHub Actions default, i.e. the latest commit in each repo) helps reduce that (see e.g. the numbers in the initial message in this PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern is that to run CI on a PR, GHA makes merge commit to the destination branch. I think to make proper merge commit git should have history at least to fork point. How does checking out w/o history work in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern is that to run CI on a PR, GHA makes merge commit to the destination branch. I think to make proper merge commit git should have history at least to fork point. How does checking out w/o history work in this case?
Can you clarify, is there some custom merge commit creation in our CI, or is it the default GHA behavior? In the latter case, GitHub creates the merge commit internally, before the checkout action runs, so the fetch-depth setting does not affect the merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing fetch-depth: 0 should be safe. The concern about the merge commit is valid for local git operations, but GHA creates the merge commit on the server's side before the job starts on a runner
fetch-tags: 'true' is likely unnecessary though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1f93d39 removes the fetch-tags, and CI seems to work fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still [skip_]dev_merge option in manual run but it seems currently unused. So having no depth should be OK.
Can skip_dev_merge be removed to make sure we don't start using it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the skip_dev_merge option in 01fa0d5.
Description
This is intended to reduce the time spent on the
git checkoutstep in CI.Not sure if we need the full checkout depth. Tests seem to pass with the default depth (=1) + tags.
Timings (min:sec) for checkout (not necessarily representative, timings vary quite a bit):
Type of change
Changes
Please list the changes introduced in this PR:
but require git tagsChecklist: