Increase AppVeyor git clone depth and lint try branch builds - #12346
Conversation
| $flake8Output = "$lintOutput\PR-Flake8.txt" | ||
| # Additionally, we can not use a clone_depth of 1, but must use an unlimited clone. | ||
| if($env:APPVEYOR_PULL_REQUEST_NUMBER) { | ||
| git fetch -q --recurse-submodules origin $env:APPVEYOR_REPO_BRANCH |
There was a problem hiding this comment.
Why do we need to recursively fetch submodules here? Same question for the fetch further down. Linting does not require the submodules I would have thought...
I would say that fetching the submodules (now twice) would be most of the 40 seconds added to the build.
There was a problem hiding this comment.
I'm not convinced it does anything after further investigation. I thought it was due to possible issues with merging - but that should only be an issue on the try branch builds if anything, not in this condition as the checked out branch should already have master merged in.
I think it might be easier to take it out and get a good example if any error is (still) thrown.
There was a problem hiding this comment.
The time difference is now much more negligible
Link to issue number:
None
Summary of the issue:
AppVeyor builds occasionally fail, such as this one, due to
git merge-base FETCH_HEAD HEADfailing aftergit fetch -q origin $env:APPVEYOR_REPO_BRANCH.We have a clone_depth set to 1. There is a warning in the appveyor docs as follows
Relevant stack trace
Additional issue tackled here: Linting isn't checked on try-builds.
Description of how this pull request fixes the issue:
Testing strategy:
Perform try builds and builds to master.
Known issues with pull request:
None
Changelog entry
None, effects build process
Code Review Checklist: