Conversation
Signed-off-by: Derek Argueta <dereka@pinterest.com>
|
How about |
|
@SaveTheRbtz nice catch, I was just trying to figure out why the git fatal error passed CI. Sadly not the first time I've been bitten by a piped failure >.< will add |
Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
|
looks better |
|
(Filed #9145 for the macOS test flake.) |
ci/run_clang_tidy.sh
Outdated
| echo "Running clang-tidy-diff against master branch..." | ||
| git fetch https://github.com/envoyproxy/envoy.git master | ||
| git diff "${SYSTEM_PULLREQUEST_TARGETBRANCH:-refs/heads/master}..HEAD" | filter_excludes | \ | ||
| git diff "$(git merge-base HEAD FETCH_HEAD)..HEAD" | filter_excludes | \ |
There was a problem hiding this comment.
The reason to use SYSTEM_PULLREQUEST_TARGETBRANCH is it will generate large diff for PR agains release branch and take forever.
Also, AZP run's on HEAD at GH pull request merge commit (i.e. refs/pull/9140/merge), so the merge-base will just be HEAD, so this generates no diff.
There was a problem hiding this comment.
I see, so the issue isn't with SYSTEM_PULLREQUEST_TARGETBRANCH but HEAD. Sounds like the correct fix here would be to replace HEAD with SYSTEM_PULLREQUEST_SOURCEBRANCH ?
There was a problem hiding this comment.
actually, I think just git diff "${SYSTEM_PULLREQUEST_TARGETBRANCH}" will work, without ..HEAD?
Signed-off-by: Derek Argueta <dereka@pinterest.com>
ci/run_clang_tidy.sh
Outdated
| echo "Running clang-tidy-diff against master branch..." | ||
| git fetch https://github.com/envoyproxy/envoy.git master | ||
| git diff "${SYSTEM_PULLREQUEST_TARGETBRANCH:-refs/heads/master}..HEAD" | filter_excludes | \ | ||
| git diff "${SYSTEM_PULLREQUEST_TARGETBRANCH}" | filter_excludes | \ |
There was a problem hiding this comment.
| git diff "${SYSTEM_PULLREQUEST_TARGETBRANCH}" | filter_excludes | \ | |
| git diff "remotes/origin/${SYSTEM_PULLREQUEST_TARGETBRANCH}" | filter_excludes | \ |
seems Azp checkout is slightly different and this should work.
ci/run_clang_tidy.sh
Outdated
| @@ -70,7 +70,7 @@ elif [[ "${BUILD_REASON}" != "PullRequest" ]]; then | |||
| else | |||
| echo "Running clang-tidy-diff against master branch..." | |||
| git fetch https://github.com/envoyproxy/envoy.git master | |||
lizan
left a comment
There was a problem hiding this comment.
I think this will work, thanks.
clang-tidy is currently yielding:
on all PRs. This reverts a small part of #8965 to go back to using the base commit (the commit from which the PR was split off from) for
git diff.Signed-off-by: Derek Argueta dereka@pinterest.com