Test merges again and return to using TRAVIS_COMMIT_RANGE#17
Merged
vbatts merged 2 commits intovbatts:masterfrom Mar 21, 2017
Merged
Test merges again and return to using TRAVIS_COMMIT_RANGE#17vbatts merged 2 commits intovbatts:masterfrom
vbatts merged 2 commits intovbatts:masterfrom
Conversation
Partially reverting ca82522 (git: do not include merges in the commit range, 2017-03-21, vbatts#16). I've kept the unrelated --no-pager addition from that commit. I think merges in the commit range should be checked against whatever criteria the caller is asking for. If the caller does not want to check a machine-generated commit, they shouldn't include it in the commit range. And we already have special-cases for merges. For example, we skip DCO checks for merge commits. I'd be happier without that special case, because human-generated merge commits can still add novel code (and therefore should have Signed-off-by), etc. But I don't think we want a blanket pass for merge commits. Signed-off-by: W. Trevor King <wking@tremily.us>
Master builds only have a 'git clone ...' [1] so FETCH_HEAD isn't defined and git-validation crashes [2]. This commit partially reverts 8a12a8f (main: default travis commit range is unreliable, 2017-03-21, vbatts#13) to avoid that crash. If TRAVIS_COMMIT_RANGE is unset [3], falling back to TRAVIS_COMMIT may be fine. The ... -> .. replacement works around travis-ci/travis-ci#4596 until that is fixed upstream [4]. This avoids pulling in commits from the base tip that aren't reachable from the head tip (e.g. if master has advanced since the PR branched off, and the PR is against master). We only want to check commits that are in the head branch but not in the base branch (more details on the range syntax in [5]). Once the Travis bug does get fixed, the shell replacement will be a no-op. So we don't have to worry about checks breaking once the bug gets fixed, and can periodically poll the bug and remove the workaround at out leisure after the fix. [1]: https://travis-ci.org/opencontainers/runc/jobs/213508696#L243 [2]: https://travis-ci.org/opencontainers/runc/jobs/213508696#L347 [3]: opencontainers/runc#1378 (comment) [4]: travis-ci/travis-ci#4596 [5]: http://git-scm.com/docs/gitrevisions#_specifying_ranges Signed-off-by: W. Trevor King <wking@tremily.us>
892c2ef to
cdd7165
Compare
Contributor
Author
|
As evidence of #16 being unnecessary when we're using |
Owner
|
such a silly bug to have to dance around |
wking
added a commit
to wking/git-validation
that referenced
this pull request
Mar 21, 2017
It's (string, old, new, n), not (old, new, string, n) [1]. Fixes a typo I'd introduced in cdd7165 (main: Return to using TRAVIS_COMMIT_RANGE (with ... -> .. fix), 2017-03-21, vbatts#17). [1]: https://golang.org/pkg/strings/#Replace Signed-off-by: W. Trevor King <wking@tremily.us>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Partially revert #15 and #16. #15 breaks when FETCH_HEAD doesn't exist (more in opencontainers/runc#1383) and #16 was a patch over the updated #15 commit range.
This commit adds the workaround for travis-ci/travis-ci#4596 which runtime-spec has been using since opencontainers/runtime-spec#216.
More details on the changes in the commit messages, if folks are particularly curious.