-
Notifications
You must be signed in to change notification settings - Fork 553
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
.travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head #216
.travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head #216
Conversation
is this really an issue to us? |
On Mon, Jan 04, 2016 at 10:39:14AM -0800, Vincent Batts wrote:
It's only an issue if there are broken commits in the master branch. |
as this has not impacted us, and may not for some foreseeable future, I'm inclined to close it. It could always be reopened if the need be. |
Time to reopen I guess. |
@cyphar what is needing the reopening? |
😕 |
On Mon, Jul 25, 2016 at 12:02:13PM -0700, Vincent Batts wrote:
I still think this is a useful change, and could land now. You |
lets give this a try. could you rebase? |
d815fa9
to
40035db
Compare
a7d8845
to
8952a6b
Compare
Work around travis-ci/travis-ci#4596 until that is fixed upstream [1]. 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 [2]). 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]: travis-ci/travis-ci#4596 [2]: http://git-scm.com/docs/gitrevisions#_specifying_ranges Signed-off-by: W. Trevor King <[email protected]>
8952a6b
to
d9b7bc3
Compare
I fixed up passing the environment variable through to git-validation
and shifted the base of the branch back a few commits for testing with
40035db → d9b7bc3. That leaves Travis testing a history like:
$ git log --graph --decorate --oneline origin/master wking/travis-test-branch-commits
* 995c556 (HEAD) Merge d9b7bc3 into c368be6
|\
| * d9b7bc3 (wking/travis-test-branch-commits, origin/pr/216) .travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
* | c368be6 (origin/master, origin/HEAD) Merge pull request #650 from wking/readme-header-nesting
|\ \
| * | 200e86f (origin/pr/650) README: Consistent header nesting
* | | dc0fa75 Merge pull request #655 from Mashimiao/schema-fix-with-latest-spec
|\ \ \
| |_|/
|/| |
| * | 5076439 (origin/pr/655) schema: fix items based on latest spec
* | | 937ea7b Merge pull request #490 from wking/json-schema-validate-http-schema
… … …
Travis is setting the buggy three-dot form (c368be6...d9b7bc3 [1]),
which includes all the commits not reachable from both commits:
$ git log --oneline c368be6...d9b7bc3
d9b7bc3 .travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
c368be6 Merge pull request #650 from wking/readme-header-nesting
dc0fa75 Merge pull request #655 from Mashimiao/schema-fix-with-latest-spec
5076439 schema: fix items based on latest spec
200e86f README: Consistent header nesting
This PR fixes that so git-validation is called with the two-dot form,
which includes only the unique-to-this-PR commit:
$ git log --oneline c368be6..d9b7bc3
d9b7bc3 .travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
[1]: https://travis-ci.org/opencontainers/runtime-spec/jobs/193276777#L292
|
Only use the auto-ranging when Travis tells us what the range is. Use our EPOCH_TEST_COMMIT-based range in all other cases. ifdef is described in [1]. [1]: https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html Signed-off-by: W. Trevor King <[email protected]>
To make make debugging Travis environment issues more straightforward. Signed-off-by: W. Trevor King <[email protected]>
I've also brought over the new commits from opencontainers/image-spec#521, which should help with failures from local-branch PRs (e.g. here for #661). |
1 similar comment
Through 3297cd5 (Merge pull request opencontainers#216 from wking/travis-test-branch-commits, 2017-01-24). Signed-off-by: W. Trevor King <[email protected]>
Work around travis-ci/travis-ci#4596 until that is fixed upstream.
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 here).
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.
Spun off from #182 now that #215 has landed.