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_COMMIT_RANGE includes commits unrelated to PR #4596
Comments
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 <wking@tremily.us>
I'm working around this with |
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 <wking@tremily.us>
Any comment on this, maintainers? |
+1 |
@BanzaiMan any updates on this? ❤️ It would be nice to at least get the problem confirmed by someone working at Travis, maybe add the workaround to the documentation |
See travis-ci/travis-ci#4596 for more details. Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
See travis-ci/travis-ci#4596 for more details. Signed-off-by: Fletcher Nichol <fnichol@nichol.ca> Pull request: #653 Approved by: fnichol
See travis-ci/travis-ci#4596 for more details. Signed-off-by: Fletcher Nichol <fnichol@nichol.ca> Pull request: #653 Approved by: fnichol
TRAVIS_COMMIT_RANGE uses triple dots, which includes commits that are in the base branch that are not in the PR. For example, if a commit is pushed to master with an incorrect summary, then every PR created before that commit will include the unrelated commit, causing the PR to fail the summary check. As suggested in travis-ci/travis-ci#4596 (comment), replace triple dots with double dots.
TRAVIS_COMMIT_RANGE uses triple dots, which includes commits that are in the base branch that are not in the PR. For example, if a commit is pushed to master with an incorrect summary, then every PR created before that commit will include the unrelated commit, causing the PR to fail the summary check. As suggested in travis-ci/travis-ci#4596 (comment), replace triple dots with double dots.
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 <wking@tremily.us>
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 <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>
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>
Here the quote from
and here from
So
will work with same commits set. |
This was causing a bunch of spurious failures. Workaround for travis-ci/travis-ci#4596 ; TRAVIS_COMMIT_RANGE is actually just totally wrong for this purpose.
This was causing a bunch of spurious failures. Workaround for travis-ci/travis-ci#4596 ; TRAVIS_COMMIT_RANGE is actually just totally wrong for this purpose.
to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
in pull-or-rebuild-image.sh to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
in pull-or-rebuild-image.sh to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
in pull-or-rebuild-image.sh to contain only commits from a PR. Ref: travis-ci/travis-ci/issues/4596
$TRAVIS_COMMIT_RANGE contains "..." instead of "..", see travis-ci/travis-ci#4596 Fixes: faadb20 ("CI: travis: new shellcheck-gitrange.bash") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
$TRAVIS_COMMIT_RANGE contains "..." instead of "..", see travis-ci/travis-ci#4596 Fixes: faadb20 ("CI: travis: new shellcheck-gitrange.bash") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
$TRAVIS_COMMIT_RANGE contains "..." instead of "..", see travis-ci/travis-ci#4596 Fixes: faadb20 ("CI: travis: new shellcheck-gitrange.bash") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
$TRAVIS_COMMIT_RANGE contains "..." instead of "..", see travis-ci/travis-ci#4596 Fixes: faadb20 ("CI: travis: new shellcheck-gitrange.bash") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
$TRAVIS_COMMIT_RANGE contains "..." instead of "..", see travis-ci/travis-ci#4596 Fixes: faadb20 ("CI: travis: new shellcheck-gitrange.bash") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
tl;dr: convert
That's true for |
and vice-versa!
|
Sounds like there's an issue with git. Has a bug been filed against it? |
Git user interface issues like this one are unfixable, imagine how many things this would break. OK, one way to "fix" interface issues like this is to add new commands and leave the old ones as they are. For instance the new For similar backward compatibility reasons it's way too late to change TRAVIS_COMMIT_RANGE. This issue should stay closed. On the other hand Travis could/should have additional variables, for instance Gitlab has CI_COMMIT_REF_NAME, CI_COMMIT_SHA, CI_COMMIT_BRANCH and a good few others. Feel free to file a new Travis issue if none yet. |
The TRAVIS_COMMIT_RANGE environment variable uses triple dots to describe the range[1]. When that is used in `git log base...HEAD`, then it will include all commits that are not in both A and B. That means we will include commits in the base branch that are unrelated to the PR. For now, do what puppet does to convert triple dots to double dots. In the future, use GITHUB_BASE_REF to determine the range of commits. [1] travis-ci/travis-ci#4596
The TRAVIS_COMMIT_RANGE environment variable uses triple dots to describe the range[1]. When that is used in `git log base...HEAD`, then it will include all commits that are not in both A and B. That means we will include commits in the base branch that are unrelated to the PR. For now, do what puppet does to convert triple dots to double dots. In the future, use GITHUB_BASE_REF to determine the range of commits. [1] travis-ci/travis-ci#4596
The TRAVIS_COMMIT_RANGE environment variable uses triple dots to describe the range[1]. When that is used in `git log base...HEAD`, then it will include all commits that are not in both A and B. That means we will include commits in the base branch that are unrelated to the PR. For now, do what puppet does to convert triple dots to double dots. In the future, use GITHUB_BASE_REF to determine the range of commits. [1] travis-ci/travis-ci#4596 (cherry picked from commit f693074)
The commit range stored in the
TRAVIS_COMMIT_RANGE
environment variable uses the triple-dot syntaxr1...r2
, which equates to "the set of commits that are reachable from either one ofr1
orr2
but not from both".This does not fit the description given in the documentation, which claims that
TRAVIS_COMMIT_RANGE
is "the range of commits that were included in the push or pull request".In order to be accurate to that description, the commit range should use the double-dot syntax,
r1..r2
, which equates to "commits that are reachable fromr2
excluding those that are reachable fromr1
". Otherwise, commits made to the target branch after the PR branch was created will be included in the commit range.Refs Homebrew/homebrew-cask#12903
The text was updated successfully, but these errors were encountered: