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

Test with Zipkin Server #150

Merged
merged 15 commits into from
Sep 26, 2019
Merged

Test with Zipkin Server #150

merged 15 commits into from
Sep 26, 2019

Conversation

saturnism
Copy link
Collaborator

@saturnism saturnism commented Sep 14, 2019

@saturnism
Copy link
Collaborator Author

PTAL at the approach for zipkin server test.

The actual call to start this test will be moved to run iff on mater branch

travis/publish.sh Outdated Show resolved Hide resolved
travis/publish.sh Outdated Show resolved Hide resolved
travis/publish.sh Outdated Show resolved Hide resolved
Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

In general, I like this approach as it is similar to other ways we test and integrate. We should add a comment somewhere explaining why we need to unzip, or a TODO to determine why.

I am a little uncomfortable about copy/pasting a wait-for-it script. If wget, curl or otherwise don't support a retry loop, I'd prefer a simple shell loop like what we use in cassandra vs a copy/paste of ambiguously licensed stuff

timeout=300
while [[ "$timeout" -gt 0 ]] && ! /cassandra/bin/cqlsh -e 'SHOW VERSION' localhost >/dev/null 2>/dev/null; do
    echo "Waiting ${timeout} seconds for cassandra to come up"
    sleep 10
    timeout=$(($timeout - 10))
done

https://github.com/openzipkin/docker-zipkin/blob/master/cassandra/install.sh#L33-L38

cc @abesto

abesto
abesto previously requested changes Sep 16, 2019
Copy link
Member

@abesto abesto left a comment

Choose a reason for hiding this comment

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

I am a little uncomfortable about copy/pasting a wait-for-it script.

My 2c on https://github.com/vishnubob/wait-for-it: this looks like a centralized, "standard" solution for a common problem. In principle I'm all for using it instead of rolling our own. Licensing on it is quite clear: it's MIT, meaning we must include the license notice along with the script, maybe in a header. Apparently it's packaged for both Debian and Ubuntu, so maybe apt-get install-ing it would be cleaner?

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

Only nits from my side.

travis/publish.sh Outdated Show resolved Hide resolved
travis/publish.sh Outdated Show resolved Hide resolved
@saturnism
Copy link
Collaborator Author

... Apparently it's packaged for both Debian and Ubuntu, so maybe apt-get install-ing it would be cleaner?

Good call. Will update.

@saturnism
Copy link
Collaborator Author

... Apparently it's packaged for both Debian and Ubuntu, so maybe apt-get install-ing it would be cleaner?

Good call. Will update.

oops - not in ubuntu xenial :(

@saturnism
Copy link
Collaborator Author

good news - i think i got the script to run the integration test pretty well.
bad news - it's failing :D

https://travis-ci.org/openzipkin/zipkin-gcp/builds/585941140#L4988

Exception in thread "armeria-common-blocking-tasks-1-1" java.lang.NoClassDefFoundError: io/grpc/Context
	at io.opencensus.trace.CurrentSpanUtils.getCurrentSpan(CurrentSpanUtils.java:37)
	at io.opencensus.trace.Tracer.spanBuilder(Tracer.java:308)
	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:847)
	at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:358)
	at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:165)
	at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:151)
	at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:113)
	at com.google.auth.Credentials$1.run(Credentials.java:99)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Sep 25, 2019

@saturnism I raised a PR #154 to fix the classpath thing

@codefromthecrypt
Copy link
Member

ok pass.. now I'm going to un-vendor wait-for-it using a stable copy we control. https://raw.githubusercontent.com/openzipkin-contrib/wait-for-it/master/wait-for-it.sh

@codefromthecrypt codefromthecrypt dismissed abesto’s stale review September 26, 2019 13:38

xenial doesn't package it

Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

If this fails master, it will help those doing releases know there's a problem. For example, it is intuitive to look at Travis prior to cutting a release.

I think it is important to do this step regardless of Docker as not everyone looks at Docker, and also we'll know if there's an issue earlier.

@codefromthecrypt codefromthecrypt merged commit 6f25d0a into master Sep 26, 2019
@codefromthecrypt codefromthecrypt deleted the server-test branch September 26, 2019 13:52
@codefromthecrypt
Copy link
Member

Cool stuff @saturnism. Just verified master, and I think we can finally cut a release safely :)

Thanks for all the support on this @anuraaga @elefeint @abesto

+curl --silent localhost:9411/info

+jq .

2019-09-26 13:55:44.316  INFO 5527 --- [           main] z.s.ZipkinServer                         : Started ZipkinServer in 5.535 seconds (JVM running for 7.22)

2019-09-26 13:55:44.508  INFO 5527 --- [orker-epoll-2-2] c.l.a.i.JavaVersionSpecific              : Using version specific APIs from Java9VersionSpecific

{

  "zipkin": {

    "version": "2.17.1-SNAPSHOT",

    "commit": "844c43b"

  }

}

++curl --silent localhost:9411/health

++jq -r .status

+health_check_result=UP

+'[' UP '!=' UP ']'

+echo 'Health check status is up!'

Health check status is up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants