Skip to content
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

KAFKA-4467: Run tests on travis-ci using docker #2376

Closed
wants to merge 1 commit into from

Conversation

raghavgautam
Copy link
Contributor

@ijuma @ewencp @cmccabe @harshach Please review.
Here is a sample run:
https://travis-ci.org/raghavgautam/kafka/builds/191714520

In this run 214 tests were run and 144 tests passed.

I will open separate jiras for fixing failures.

@asfbot
Copy link

asfbot commented Jan 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/870/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented Jan 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/870/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Jan 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/872/
Test PASSed (JDK 8 and Scala 2.11).

Copy link
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

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

@raghavgautam Is this going to enable reports to GH PRs immediately based on the tests run? If it won't affect anyone negatively, then I think we're in good shape to just merge this.

On the other hand, if we can merge this now and work incrementally on getting the tests stable under TravisCI, then we could merge this immediately. Which is the case -- I think if we merge the .travis.yml file it'll start reporting failures on every PR; but if we can do this in a way that folks realize it's not a blocker, I think that could be ok. If it'll cause PRs to end up blocked unnecessarily, then I think we'd want to stabilize the tests first.

- gradle wrapper

script:
- ./gradlew rat
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for putting this check first, probably saves us a lot of time :)

tests/README.md Outdated

* Getting number of tests that were actually run
```
for id in $(curl -sSL https://api.travis-ci.org/builds/$BUILD_ID | jq '.matrix|map(.id)|.[]'); do curl -sSL "https://api.travis-ci.org/jobs/$id/log.txt?deansi=true" ; done | egrep 'RunnerClient: Loading test' | wc
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really critical, but just linking to the JSON output format for the TravisCI API seems more useful (perhaps with one example of extracting relevant info with jq).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ewencp Would it be a problem if I use urls like:
https://travis-ci.org/raghavgautam/kafka/builds/191714520
This way I will be able to put working examples in the documentation.
Note: raghavgautam in the url

@raghavgautam
Copy link
Contributor Author

raghavgautam commented Jan 17, 2017

@ewencp This will not affect development of kafka in any way. The incoming pull requests & commits will not be affected. It will just help us to start working towards bringing up pass rates on travis-ci.

Once, the pass rate of tests is good, we can discuss about integrating it with pull requests.

@raghavgautam
Copy link
Contributor Author

@ewencp Please review.

@asfbot
Copy link

asfbot commented Feb 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/1406/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link

asfbot commented Feb 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/1403/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented Feb 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/1403/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Feb 3, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/1463/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Feb 3, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/1464/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Feb 3, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/1464/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented Feb 3, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/1467/
Test PASSed (JDK 8 and Scala 2.11).

@raghavgautam
Copy link
Contributor Author

@ewencp Ping.

@asfbot
Copy link

asfbot commented Feb 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/1697/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Feb 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/1697/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented Feb 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/1700/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link

asfbot commented Mar 7, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/2053/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link

asfbot commented Mar 7, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/2050/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Mar 7, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/2054/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link

asfbot commented Mar 7, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/2051/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented Mar 7, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/2052/
Test FAILed (JDK 8 and Scala 2.12).

@harshach
Copy link

harshach commented Mar 8, 2017

+1 . @ewencp if you have any feedback that requires changes let us know. Otherwise I'll merge it in.

Copy link
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

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

@raghavgautam @harshach A couple of questions. If the question around not installing jdk doesn't affect running outside of travis w/ docker, then go ahead and commit.

Only other thing I'd call out is that #2613 fixed some other issues, I'd try to make sure this patch isn't affected by those fixes.

@@ -21,7 +21,7 @@ ENV MIRROR="http://apache.cs.utah.edu/"

ADD ssh /root/.ssh
RUN chmod 600 /root/.ssh/id_rsa
RUN apt update && apt install -y unzip wget curl jq coreutils openssh-server net-tools vim openjdk-8-jdk python-pip python-dev libffi-dev libssl-dev
RUN apt update && apt install -y unzip wget curl jq coreutils openssh-server net-tools vim python-pip python-dev libffi-dev libssl-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like removing the openjdk-8-jdk install will break things for anyone running on docker outside travis? Or I'm missing something?

Perhaps more helpfully, does it break if we still include the jdk so it will work for non-Travis cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ewencp Since we start with openjdk:8 image this is not necessary. (see line 16: FROM openjdk:8). And this change will not break anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ewencp Since we start with openjdk:8 image this is not necessary. (see line 16: FROM openjdk:8). And this change will not break anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack, totally missed that.

@@ -31,6 +31,309 @@ TC_PATHS="tests/kafkatest/tests/streams tests/kafkatest/tests/tools" bash tests/
- The docker containers are named knode01, knode02 etc.
These nodes can't be used for any other purpose.

Examining CI run
----------------
* Set BUILD_ID is travis ci's build id. E.g. build id is 169519874 for the following build
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this is a chicken & egg situation, but we probably want to replace this eventually with an example ID that actually ran some tests :) Unless something went wrong when I ran the commands with this build ID? The docs here suggest I'll get output for tests, but all the test counts are zero for me w/ this ID.

@ewencp
Copy link
Contributor

ewencp commented Mar 9, 2017

And sorry for the very long delay on review :(

@raghavgautam
Copy link
Contributor Author

I did look at #2613 when I was rebasing this pull request & resolving merge conflicts.
I ran tests both locally and on travis-ci and everything looks good.

@ewencp
Copy link
Contributor

ewencp commented Mar 10, 2017

LGTM

@asfgit asfgit closed this in dbcbd79 Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants