Skip to content

Make Travis clone the full repo and the exact commit requested#8331

Merged
edoakes merged 3 commits intoray-project:masterfrom
mehrdadn:travis-bugfix
May 12, 2020
Merged

Make Travis clone the full repo and the exact commit requested#8331
edoakes merged 3 commits intoray-project:masterfrom
mehrdadn:travis-bugfix

Conversation

@mehrdadn
Copy link
Copy Markdown
Contributor

@mehrdadn mehrdadn commented May 5, 2020

Why are these changes needed?

  • Travis only clones with a shallow depth, preventing diffs from succeeding when the commit is too old, thus causing such old jobs to fail.

  • Travis always clones the last commit on a PR, not the one the job is actually triggered for. This can be very misleading and confusing, as there can be several hours between job queuing and cloning.

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/latest/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failure rates at https://ray-travis-tracker.herokuapp.com/.
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested (please justify below)

@AmplabJenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@mehrdadn mehrdadn marked this pull request as ready for review May 5, 2020 23:35
git:
clone: false # Clone manually to work around Travis issues like https://github.com/travis-ci/travis-ci/issues/6337
depth: false # Shallow clones can prevent diff against base branch
quiet: true
Copy link
Copy Markdown
Contributor Author

@mehrdadn mehrdadn May 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(clone: false renders the other lines moot, but I kept them both for documentation and so they have the proper behavior in case someone changes clone: false later.)

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/25580/
Test PASSed.

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/25579/
Test PASSed.

@edoakes
Copy link
Copy Markdown
Collaborator

edoakes commented May 7, 2020

Cloning the exact commit makes a lot of sense. Should we even be running the CI job if the latest commit isn't the one in the build, though?

Also not totally sure I understand the shallow clone issue. Is the problem that sometimes the PR creator's branch is >50 commits behind master?

@mehrdadn
Copy link
Copy Markdown
Contributor Author

mehrdadn commented May 7, 2020

@edoakes I'm not sure, but it shouldn't really affect this. Note that right now, if none of the jobs for that build have started, then they already get canceled on Travis anyway, so I guess the answer is a qualified "no". But if one of them has started, then the current behavior is that the other jobs end up building the wrong (latest) commit redundantly, which is definitely actively harmful. It seems strictly better to at least be consistent about the commit being built, which is what this PR is for. The question of whether we want to be more proactive about canceling things is definitely a valid one we should discuss but orthogonal to this PR I think. (In fact, I had a PR to auto-cancel in-progress builds upon a push, but it was rejected.)

Regarding the shallow clone, I believe that's one situation where it currently happens, yeah. I'm not entirely clear if it's the only situation though (it might even depend on whether we're cloning the latest commit or the queued commit). But for example, it occurred here recently, which appeared to be because master was so far ahead that the diff failed to find the commit on it.

Copy link
Copy Markdown
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mehrdadn
Copy link
Copy Markdown
Contributor Author

@edoakes Oh wow it looked unrelated at first glance, I didn't realize it might be due to this. Thanks for catching! I'll see if I can fix it.

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/25798/
Test PASSed.

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/25804/
Test PASSed.

@edoakes edoakes merged commit a3b95d4 into ray-project:master May 12, 2020
@mehrdadn mehrdadn deleted the travis-bugfix branch May 12, 2020 15:41
mfitton pushed a commit to mfitton/ray that referenced this pull request May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants