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

kokoro-macos/continuous builds failing #730

Closed
TadCordle opened this issue Jul 27, 2018 · 14 comments
Closed

kokoro-macos/continuous builds failing #730

TadCordle opened this issue Jul 27, 2018 · 14 comments

Comments

@TadCordle
Copy link
Contributor

TadCordle commented Jul 27, 2018

It seems there's an issue on macOS where consecutive builds introduce a slowdown, which causes the test to fail.

[ERROR] testExecute_empty(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 20.664 s  <<< FAILURE!
java.lang.AssertionError: First build time (8728749621) is not greater than second build time (9143508245)
	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.buildAndRun(BuildImageMojoIntegrationTest.java:67)
	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.testExecute_empty(BuildImageMojoIntegrationTest.java:129)
@coollog coollog added this to the 0.9.10 milestone Aug 3, 2018
@TadCordle TadCordle changed the title kokoro-macos/continuous builds fail due to consecutive jib builds being slower kokoro-macos/continuous builds failing Aug 16, 2018
@TadCordle
Copy link
Contributor Author

Now it's failing due to bad certificates.

[ERROR] testExecute_empty(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 8.916 s  <<< ERROR!
java.lang.RuntimeException: 
Command 'docker pull gcr.io/distroless/java:latest' failed: Error response from daemon: Get https://gcr.io/v2/: x509: certificate has expired or is not yet valid

	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.setup(BuildImageMojoIntegrationTest.java:160)

[ERROR] testExecute_complex_sameFromAndToRegistry(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 5.884 s  <<< ERROR!
java.lang.RuntimeException: 
Command 'docker pull gcr.io/distroless/java:latest' failed: Error response from daemon: Get https://gcr.io/v2/: x509: certificate has expired or is not yet valid

	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.setup(BuildImageMojoIntegrationTest.java:160)

[ERROR] testExecute_defaultTarget(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 5.891 s  <<< ERROR!
java.lang.RuntimeException: 
Command 'docker pull gcr.io/distroless/java:latest' failed: Error response from daemon: Get https://gcr.io/v2/: x509: certificate has expired or is not yet valid

	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.setup(BuildImageMojoIntegrationTest.java:160)

[ERROR] testExecute_complex(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 5.931 s  <<< ERROR!
java.lang.RuntimeException: 
Command 'docker pull gcr.io/distroless/java:latest' failed: Error response from daemon: Get https://gcr.io/v2/: x509: certificate has expired or is not yet valid

	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.setup(BuildImageMojoIntegrationTest.java:160)

[ERROR] testExecute_simple(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 5.877 s  <<< ERROR!
java.lang.RuntimeException: 
Command 'docker pull gcr.io/distroless/java:latest' failed: Error response from daemon: Get https://gcr.io/v2/: x509: certificate has expired or is not yet valid

	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.setup(BuildImageMojoIntegrationTest.java:160)

@briandealwis
Copy link
Member

What JDK is it using?

@TadCordle
Copy link
Contributor Author

TadCordle commented Aug 16, 2018

It's using 1.8.0_152, but that's probably unrelated to the certificate issue considering it's caused by docker pull. I wonder if the java version could be the source of the build time problem, though.

@briandealwis
Copy link
Member

Not sure how I missed that it was docker pull failing! But
moby/moby#11534 (comment) suggests that this problem can occur if there is clock drift.

@briandealwis
Copy link
Member

And that explain the original build error. (I thought Mac boxes were configured to use NTP by default?)

@coollog
Copy link
Contributor

coollog commented Aug 16, 2018

Btw, I filed an issue with the Kokoro team to get their help with this issue.

@coollog coollog mentioned this issue Aug 17, 2018
@coollog coollog modified the milestones: v0.9.10, v0.9.11 Aug 29, 2018
@chanseokoh
Copy link
Member

From my testing, seems like we can work around the certificate error by following the simple trick documented in the bug (just restarting the Docker daemon). It may take a long time for the Kokoro team to apply and roll out a permanent fix, so let's just restart Docker on our side as a temporary fix. I'll work on this.

@TadCordle
Copy link
Contributor Author

Can we close this, or do you want to leave it open for the otherwise flaky tests?

@coollog
Copy link
Contributor

coollog commented Sep 7, 2018

Let's leave this open for a few more commits to master and see how flaky the tests still are.

@TadCordle
Copy link
Contributor Author

If they are still flaky, we do have this issue open #940

@coollog
Copy link
Contributor

coollog commented Sep 7, 2018

Let's see if the first vs. second build time check still fails regularly.

@TadCordle
Copy link
Contributor Author

Yeah, looks like it's still not fixed. Latest error:

[ERROR] testExecute_simple(com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest)  Time elapsed: 34.124 s  <<< FAILURE!
java.lang.AssertionError: First build time (8945.196) is not greater than second build time (9264.685)
	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.buildAndRun(BuildImageMojoIntegrationTest.java:90)
	at com.google.cloud.tools.jib.maven.BuildImageMojoIntegrationTest.testExecute_simple(BuildImageMojoIntegrationTest.java:218)

@TadCordle TadCordle modified the milestones: v0.9.11, v0.10.0 Sep 26, 2018
@coollog
Copy link
Contributor

coollog commented Oct 2, 2018

This is happening with much less frequency now. Moving this to a later milestone to revisit if needed.

@coollog coollog modified the milestones: v0.10.0, v0.11.0 Oct 2, 2018
@coollog
Copy link
Contributor

coollog commented Nov 9, 2018

Closing as this is basically not happening anymore.

@coollog coollog closed this as completed Nov 9, 2018
@chanseokoh chanseokoh removed this from the v1.1.0 milestone Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants