[YUNIKORN-2098] Change go lint SHA detection #733
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this PR for?
In YUNIKORN-285, we previously included git symbolic-ref -q HEAD because Travis CI often encountered a detached head situation. However, now that we have switched to GitHub Actions, we can utilize the checkout@v3 action, which efficiently fetches all Git references.
Consequently, we can remove
git symbolic-ref -q HEAD
Instead, we can initially setREV='origin/HEAD'
If git rev-parse fails, we can fall back toREV=HEAD^
Regarding the modification from
fetch-depth: 2
tofetch-depth: 0
, I have compared the GitHub Action times before this pull request and with the master. The duration of the git checkout action remained around 2 seconds. Therefore, I believe this change is acceptable, as it does not introduce significant overhead.I encountered this issue when I manually triggered a GitHub Action in the k8shim fork repository. In contrast, manually triggering GitHub Actions in the core repository does not lead to this issue. This is because, in the core repository, the Golang CI is only executed when submitting a Pull Request.
However, I believe ensuring consistency in the
make lint
process between k8shim and core is the correct approach.Perhaps we could consider aligning k8shim's GolangCI behavior with that of the core? (only triggering during PR)
cc @craigcondit @wilfred-s
What type of PR is it?
What is the Jira issue?
YUNIKORN-2098