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

Create temp files in a temp directory #450

Conversation

banadiga
Copy link
Contributor

@banadiga banadiga commented Sep 1, 2017

The base idea is to create folder .testcontainers.tmp.something in a temporary directory.

Fix for #423

@kiview
Copy link
Member

kiview commented Sep 14, 2017

PR LGTM, does it work on Mac? (I can test Windows at home)

@@ -168,6 +170,14 @@ private String extractClassPathResourceToTempLocation(final String hostPath) {
return tmpLocation.getAbsolutePath();
}

private File createTempDirectory() {
try {
return Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), TESTCONTAINERS_TMP_DIR_PREFIX).toFile();
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you are not using createTempDirectory(String prefix, FileAttribute<?>... attrs)? I assume this should have the same effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right, it is the same.

Copy link
Member

Choose a reason for hiding this comment

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

Do you want to change the method call, or do we have to specifically cater for macOS after all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to change the method call and change temporary dir for macOS.

What do you think about the following method?

private File createTempDirectory() {
    try {
        if (SystemUtils.IS_OS_MAC) {
            return Files.createTempDirectory(Paths.get("/tmp"), TESTCONTAINERS_TMP_DIR_PREFIX).toFile();
        }
        return Files.createTempDirectory(TESTCONTAINERS_TMP_DIR_PREFIX).toFile();
    } catch  (IOException e) {
        return new File(TESTCONTAINERS_TMP_DIR_PREFIX + Base58.randomString(5));
    }
}

Copy link
Member

Choose a reason for hiding this comment

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

In which case would the code inside the catch block be desired behavior I wonder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example user runs java with params -Djava.io.tmpdir=<folder> on linux/windows.

In cases, the folder does not exist we will get IOException.

I think we could try to create a temp folder in the current folder as it was before

@banadiga
Copy link
Contributor Author

@kiview Looks like we can not use System.getProperty("java.io.tmpdir") for Mac.
By default System.getProperty("java.io.tmpdir") is /var/folders/....

Taking to account documentation https://docs.docker.com/docker-for-mac/osxfs/#access-control

By default, you can share files in /Users/, /Volumes/, /private/, and /tmp directly.

Looks like we should use /tmp as the temporary directory on Mac.

@kiview
Copy link
Member

kiview commented Sep 19, 2017

There's also this Windows specific line:
https://github.com/banadiga/testcontainers-java/blob/5117e1aa0d15d6cd658d158b68d1a73661601c57/core/src/main/java/org/testcontainers/utility/MountableFile.java#L127

I would prefer to have the platform specific branches in a single place (if possible).

Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

While I like the change, it's important to understand that AFAIR it will not work with docker-machine on Mac, for instance. Or at least it didn't work. By default, docker-machine will not map /tmp volume and some manual configuration is required. It was also the case for Docker for Mac, but then they added /tmp and /private/tmp to the list of mounts. Before accepting this PR, we have to check it against different versions of docker-machine and Docker for Mac to make sure that we will not introduce a regression. Or, even if we do so, we should mention it somewhere that the minimum d4m/Docker Machine version is that now :)

@rnorth
Copy link
Member

rnorth commented Sep 19, 2017

Yes, I agree with @bsideup - unfortunately there are quite a few permutations we need to make sure we have covered.

I think specifying a new 'minimum version' for Mac clients wouldn't be too evil, though. In all likelihood, developer machines will be receiving fairly regular/automatic updates, so it's not as much of a problem as requiring a recent version of Docker on Linux CI servers, for example.

I'll try and do a bit of Mac testing for this tomorrow.

@kiview
Copy link
Member

kiview commented Sep 19, 2017

I quickly tested this PR on my Windows box (Windows 10, Docker for Windows 17.06.2-ce-win27) and the MountableFileTests won't work, because 540f2ee from master fixed the Windows file stuff in general.

After rebasing the PR on master, the tests run fine on Windows and the temp file will be created in C:\Users\$USER\AppData\Local\Temp\testcontainers2414436287990040565\some path for example.

So functionality looks fine on Docker for Windows.

@banadiga banadiga force-pushed the create-temp-files-in-atemp-dorectory branch from 5117e1a to a0ff477 Compare September 20, 2017 17:16
@banadiga
Copy link
Contributor Author

@kiview I rebase with the master. Also, I added the specific implementation for mac.
Build passed on Linux.

Unfortunately, I'm not currently able to run the build on Mac or Windows. I'll run build on Mac tomorrow(as soon as possible).

@banadiga
Copy link
Contributor Author

Build passed on Mac

return Files.createTempDirectory(Paths.get(OS_MAC_TMP_DIR), TESTCONTAINERS_TMP_DIR_PREFIX).toFile();
}
return Files.createTempDirectory(TESTCONTAINERS_TMP_DIR_PREFIX).toFile();
} catch (IOException e) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain the conditions and circumstances, under which you expect this Exception to happen and how this return value solves the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example user runs java with params -Djava.io.tmpdir=<folder> on linux/windows.

In cases, the folder does not exist we will get IOException.

I think we could try to create a temp folder in the current folder as it was before.

Is it make sense?

Copy link
Member

Choose a reason for hiding this comment

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

Okay, sounds good.

@@ -33,6 +33,9 @@
@Slf4j
public class MountableFile implements Transferable {

private static final String TESTCONTAINERS_TMP_DIR_PREFIX = ".testcontainers-tmp-";
public static final String OS_MAC_TMP_DIR = "/tmp";
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be public?

@kiview
Copy link
Member

kiview commented Sep 21, 2017

Anyone up for regression testing this on older Docker for Mac versions?

@dbyron0
Copy link
Contributor

dbyron0 commented Sep 21, 2017

Is

$ docker-machine --version
docker-machine version 0.7.0, build a650a40

on Yosemite (10.10.5) old enough?

@dbyron0
Copy link
Contributor

dbyron0 commented Sep 21, 2017

If it's helpful, mvn clean verify hangs here on master on this machine:

[INFO] 
[INFO] --- maven-surefire-plugin:2.20:test (default-test) @ testcontainers ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.testcontainers.containers.FailureDetectingExternalResourceTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.17 s - in org.testcontainers.containers.FailureDetectingExternalResourceTest
[INFO] Running org.testcontainers.containers.NetworkTest
15:14:19.436 DEBUG org.testcontainers.utility.TestcontainersConfiguration - Testcontainers configuration overrides will be loaded from file:/Users/david.byron/.testcontainers.properties
15:14:19.439 DEBUG org.testcontainers.utility.TestcontainersConfiguration - Testcontainers configuration overrides loaded from TestcontainersConfiguration(properties={docker.client.strategy=org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy})
15:14:19.838 DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy - Pinging docker daemon...
15:14:20.575 INFO  org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy - Found docker client settings from environment
15:14:20.590 INFO  org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved: 
    dockerHost=tcp://192.168.99.100:2376
    apiVersion='{UNKNOWN_VERSION}'
    registryUrl='https://index.docker.io/v1/'
    registryUsername='david.byron'
    registryPassword='null'
    registryEmail='null'
    dockerConfig='DefaultDockerClientConfig[dockerHost=tcp://192.168.99.100:2376,registryUsername=david.byron,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfig=/Users/david.byron/.docker,sslConfig=LocalDirectorySSLConfig{dockerCertPath=/Users/david.byron/.docker/machine/machines/docker-vm},apiVersion={UNKNOWN_VERSION}]'

15:14:20.592 INFO  org.testcontainers.DockerClientFactory - Docker host IP address is 192.168.99.100
15:14:20.791 INFO  org.testcontainers.DockerClientFactory - Connected to docker: 
  Server Version: 1.12.0-rc3
  API Version: 1.24
  Operating System: Boot2Docker 1.12.0-rc3 (TCL 7.1); HEAD : 8d9ee9f - Sat Jul  2 05:02:44 UTC 2016
  Total Memory: 995 MB
        ℹ︎ Checking the system...
        ✔ Docker version should be at least 1.6.0
        ✔ Docker environment should have more than 2GB free disk space
        ✔ File should be mountable
        ✔ A port exposed by a docker container should be accessible
        ✔ Flag is set
15:14:29.821 DEBUG org.testcontainers.utility.ResourceReaper - Removed network: 9050826db73bbe4c5dd18302ccbb4a990538ae5254bb3b3c4f8688fee7bdd472
15:14:29.950 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:29.950 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5
15:14:29.951 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5 (attempt 1/1)
15:14:29.951 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:29.951 INFO  🐳 [alpine:3.5] - Creating container for image: alpine:3.5
15:14:30.123 INFO  🐳 [alpine:3.5] - Starting container with ID: dd168476d76ffd030cda925f72080126677c547ac848c32111d0f9c5a34b655e
15:14:30.263 INFO  🐳 [alpine:3.5] - Container alpine:3.5 is starting: dd168476d76ffd030cda925f72080126677c547ac848c32111d0f9c5a34b655e
15:14:30.318 DEBUG org.testcontainers.containers.wait.HostPortWaitStrategy - Liveness check port of /gloomy_pare is empty. Not waiting.
15:14:30.318 INFO  🐳 [alpine:3.5] - Container alpine:3.5 started
15:14:30.318 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:30.318 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5
15:14:30.318 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5 (attempt 1/1)
15:14:30.318 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:30.318 INFO  🐳 [alpine:3.5] - Creating container for image: alpine:3.5
15:14:30.353 INFO  🐳 [alpine:3.5] - Starting container with ID: 329768ab3f0fdf155c97edf607314d2a04ae10a283625513a719e6a7be0e0b6e
15:14:30.491 INFO  🐳 [alpine:3.5] - Container alpine:3.5 is starting: 329768ab3f0fdf155c97edf607314d2a04ae10a283625513a719e6a7be0e0b6e
15:14:31.344 DEBUG org.testcontainers.containers.wait.HostPortWaitStrategy - Liveness check port of /lonely_curran is empty. Not waiting.
15:14:31.344 INFO  🐳 [alpine:3.5] - Container alpine:3.5 started
15:14:31.368 DEBUG 🐳 [alpine:3.5] - Running "exec" command: wget -O - http://foo:8080
        ✔ received response
15:14:31.641 DEBUG org.testcontainers.utility.ResourceReaper - Removed container and associated volume(s): alpine:3.5
15:14:31.795 DEBUG org.testcontainers.utility.ResourceReaper - Removed container and associated volume(s): alpine:3.5
15:14:31.960 DEBUG org.testcontainers.utility.ResourceReaper - Removed network: 26f0fe1560491c40f954310ccda687337ab835b55727c00eb26f49b7bbc52eaa
        ✔ Flag is set
15:14:32.093 DEBUG org.testcontainers.utility.ResourceReaper - Removed network: 8b576935139bbe70196923fec862827886ddc22cdac338cfbe643a2626cbfd54
15:14:32.094 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:32.094 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5
15:14:32.094 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5 (attempt 1/1)
15:14:32.094 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:32.094 INFO  🐳 [alpine:3.5] - Creating container for image: alpine:3.5
15:14:32.271 INFO  🐳 [alpine:3.5] - Starting container with ID: 2f62638d045f1e47eb78be774a52282d92df1a71490b6354ef48c48f5a13d564
15:14:32.421 INFO  🐳 [alpine:3.5] - Container alpine:3.5 is starting: 2f62638d045f1e47eb78be774a52282d92df1a71490b6354ef48c48f5a13d564
15:14:32.467 DEBUG org.testcontainers.containers.wait.HostPortWaitStrategy - Liveness check port of /reverent_archimedes is empty. Not waiting.
15:14:32.467 INFO  🐳 [alpine:3.5] - Container alpine:3.5 started
15:14:32.468 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:32.468 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5
15:14:32.468 DEBUG 🐳 [alpine:3.5] - Trying to start container: alpine:3.5 (attempt 1/1)
15:14:32.468 DEBUG 🐳 [alpine:3.5] - Starting container: alpine:3.5
15:14:32.468 INFO  🐳 [alpine:3.5] - Creating container for image: alpine:3.5
15:14:32.507 INFO  🐳 [alpine:3.5] - Starting container with ID: bbff361e0a5a7172ac004d0f642d8a25b61efc2e4aa2916f7f4463abf0e79044
15:14:32.685 INFO  🐳 [alpine:3.5] - Container alpine:3.5 is starting: bbff361e0a5a7172ac004d0f642d8a25b61efc2e4aa2916f7f4463abf0e79044
15:14:33.493 DEBUG org.testcontainers.containers.wait.HostPortWaitStrategy - Liveness check port of /big_hawking is empty. Not waiting.
15:14:33.493 INFO  🐳 [alpine:3.5] - Container alpine:3.5 started
15:14:33.515 DEBUG 🐳 [alpine:3.5] - Running "exec" command: wget -O - http://foo:8080
        ✔ received response
15:14:33.773 DEBUG org.testcontainers.utility.ResourceReaper - Removed container and associated volume(s): alpine:3.5
15:14:33.970 DEBUG org.testcontainers.utility.ResourceReaper - Removed container and associated volume(s): alpine:3.5
15:14:34.160 DEBUG org.testcontainers.utility.ResourceReaper - Removed network: 1c8618b32fe74bd24f1343584503ad962eb423836ece959dd04ac51e2de5dba5
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.896 s - in org.testcontainers.containers.NetworkTest
[INFO] Running org.testcontainers.dockerclient.DockerClientConfigUtilsTest
[WARNING] Tests run: 5, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.002 s - in org.testcontainers.dockerclient.DockerClientConfigUtilsTest
[INFO] Running org.testcontainers.DockerClientFactoryTest
        ✔ Available MB is correct
        ✔ Available percentage is correct

On the banadiga:create-temp-files-in-atemp-dorectory repo/branch it hangs in the same place.

@kiview
Copy link
Member

kiview commented Sep 26, 2017

So support might be already broken for docker-machine version 0.7.0, build a650a40 ?

@dbyron0
Copy link
Contributor

dbyron0 commented Sep 26, 2017

Perhaps, though I'm using testcontainers-java version 1.4.2 just fine.

@rnorth
Copy link
Member

rnorth commented Sep 27, 2017

@dbyron0 seems like there must be another issue in between 1.4.2 and master - sorry 😞

I'm going to do some compatibility testing this evening with old versions of docker toolbox, running on OS X Sierra.

@dbyron0
Copy link
Contributor

dbyron0 commented Sep 27, 2017

Well, turns out I lied...at least a little. I'm using 1.4.2 in a project of mine and it does work fine. mvn clean verify does struggle. I've had the tests pass before for me, so I'm not sure what changed. Here's the failure:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project testcontainers: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/david.byron/src/testcontainers-java/core/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/david.byron/src/testcontainers-java/core && /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/bin/java -jar /Users/david.byron/src/testcontainers-java/core/target/surefire/surefirebooter6352632337834027144.jar /Users/david.byron/src/testcontainers-java/core/target/surefire 2017-09-27T13-21-00_232-jvmRun1 surefire3718428744023438740tmp surefire_01682819385670339072tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 133
[ERROR] Crashed tests:
[ERROR] org.testcontainers.containers.NetworkTest$WithoutRules
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/david.byron/src/testcontainers-java/core && /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/bin/java -jar /Users/david.byron/src/testcontainers-java/core/target/surefire/surefirebooter6352632337834027144.jar /Users/david.byron/src/testcontainers-java/core/target/surefire 2017-09-27T13-21-00_232-jvmRun1 surefire3718428744023438740tmp surefire_01682819385670339072tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 133
[ERROR] Crashed tests:
[ERROR] org.testcontainers.containers.NetworkTest$WithoutRules
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:679)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:497)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

where src/testcontainers-java/core/target/surefire-reports/2017-09-27T13-21-48_396.dumpstream has:

# Created on 2017-09-27T13:21:48.397
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime

# Created on 2017-09-27T13:21:48.397
  Referenced from: /private/var/folders/dn/0rbsn8cs25l0yzczh63yyw4r0000gp/T/libnetty-transport-native-kqueue5087535911627354413.dylib (which was built for M

# Created on 2017-09-27T13:21:48.397
  Expected in: /usr/lib/libSystem.B.dylib

# Created on 2017-09-27T13:21:48.398


# Created on 2017-09-27T13:21:48.398
dyld: Symbol not found: _clock_gettime

# Created on 2017-09-27T13:21:48.398
  Referenced from: /private/var/folders/dn/0rbsn8cs25l0yzczh63yyw4r0000gp/T/libnetty-transport-native-kqueue5087535911627354413.dylib (which was built for M

# Created on 2017-09-27T13:21:48.399
  Expected in: /usr/lib/libSystem.B.dylib

# Created on 2017-09-27T13:21:48.399


# Created on 2017-09-27T13:21:48.858
/bin/sh: line 1: 14447 Trace/BPT trap: 5       /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/bin/java -jar /Users/david.byron/src/test

@rnorth
Copy link
Member

rnorth commented Sep 27, 2017

Ah, @dbyron0 that looks like netty/netty#6837 popping up again 😬 . We explicitly made sure that it would not arise in normal usage on OS X <10.12, but it seems that in our own build process at least the affected code path is being activated. I'm afraid this means that testcontainers development on OS X requires 10.12+ now.

@dbyron0
Copy link
Contributor

dbyron0 commented Sep 27, 2017

Thanks for working that out. Looks like it's time for an upgrade, or if I'm very lucky, a new machine.

@kiview
Copy link
Member

kiview commented Oct 3, 2017

@rnorth Do you think we can risk merging and dropping support for older versions?

@rnorth
Copy link
Member

rnorth commented Oct 14, 2017

Re development of testcontainers not being possible on older versions of OS X - I'm OK with that.

By way of an additional regression test for this feature, I've run it against a OS X Docker Machine using a boot2docker v1.12.1 ISO, which was released in August 2016. I'd like to try and test with a similarly old version of the docker-machine tool itself, but this will be time consuming. Will set that in motion, though.

@narma
Copy link

narma commented Nov 10, 2017

Bump, any news on this?

@rnorth
Copy link
Member

rnorth commented Nov 19, 2017

Sorry for the delay. I've tested with docker-machine 0.8.2 with the 1.12.1 boot2docker ISO (dating back to September 2016) and it's fine.

As such, LGTM :)

@rnorth
Copy link
Member

rnorth commented Nov 20, 2017

Have rebased, resolved merge conflicts, and merged into master. Thanks @banadiga !

@rnorth rnorth closed this Nov 20, 2017
rnorth pushed a commit that referenced this pull request Dec 24, 2018
Bumps [influxdb-java](https://github.com/influxdata/influxdb-java) from 2.10 to 2.14.
<details>
<summary>Changelog</summary>

*Sourced from [influxdb-java's changelog](https://github.com/influxdata/influxdb-java/blob/master/CHANGELOG.md).*

> ## 2.14 [2018-10-12]
> 
> ### Fixes
> 
> - Fixed chunked query exception handling [Issue #523](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/523)
> - Memory leak in StringBuilder cache for Point.lineprotocol() [Issue #526](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/521)
> 
> ## 2.13 [2018-09-12]
> 
> ### Fixes
> - MessagePack queries: Exception during parsing InfluxDB version [macOS] [PR #487](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/487)
> - The InfluxDBResultMapper is able to handle results with a different time precision [PR #501](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/501)
> - UDP target host address is cached [PR #502](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/502)
> - Error messages from server not parsed correctly when using msgpack [PR #506](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/506)
> - Response body must be closed properly in case of JSON response [PR #514](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/514)
> - Time is serialized not consistently in MsgPack and Json, missing millis and nanos in MsgPack[PR #517](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/517)
> 
> ### Features
> 
> - Support for Basic Authentication [PR #492](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/492)
> - Added possibility to reuse client as a core part of [influxdb-java-reactive](https://github.com/bonitoo-io/influxdb-java-reactive) client [PR #493](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/493)
> - Retry capability for writing of BatchPoints [PR #503](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/503)
> - Added `BiConsumer` with capability to discontinue a streaming query [Issue #515](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/515)
> - Added `onComplete` action that is invoked after successfully end of streaming query [Issue #515](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/515)
> 
> ## 2.12 [2018-07-31]
> 
> ### Fixes
> 
> - Remove code which checks for unsupported influxdb versions [PR #474](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/474)
> - Unpredictable errors when OkHttpClient.Builder instance is reused [PR #478](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/478)
> 
> ### Features
> 
> - Support for MessagePack [PR #471](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/471)
> - Cache version per influxdb instance and reduce ping() calls for every query call [PR #472](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/472)
> - FAQ list for influxdb-java [PR #475](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/475)
> 
> ### Improvements
> 
> - Test: Unit test to ensure tags should be sorted by key in line protocol (to reduce db server overheads) [PR #476](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/476)
> 
> ## 2.11 [2018-07-02]
> 
> ### Features
> 
> - Allow write precision of TimeUnit other than Nanoseconds [PR #321](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/321)
> - Support dynamic measurement name in InfluxDBResultMapper [PR #423](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/423)
> - Debug mode which allows HTTP requests being sent to the database to be logged [PR #450](https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/450)
> - Fix problem of connecting to the influx api with URL which does not points to the url root (e.g. localhots:80/influx-api/) [PR #400] (https://github-redirect.dependabot.com/influxdata/influxdb-java/pull/400)
></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`91d0f09`](influxdata/influxdb-java@91d0f09) [maven-release-plugin] prepare release influxdb-java-2.14
- [`8ffaeb9`](influxdata/influxdb-java@8ffaeb9) Revert "[maven-release-plugin] prepare release influxdb-java-2.14"
- [`2781da2`](influxdata/influxdb-java@2781da2) [maven-release-plugin] prepare release influxdb-java-2.14
- [`19c69ed`](influxdata/influxdb-java@19c69ed) [maven-release-plugin] prepare for next development iteration
- [`c6d7f25`](influxdata/influxdb-java@c6d7f25) [maven-release-plugin] prepare release influxdb-java-2.14
- [`2f4c594`](influxdata/influxdb-java@2f4c594) Merge pull request [#531](https://github-redirect.dependabot.com/influxdata/influxdb-java/issues/531) from heshengbang/master
- [`f653e62`](influxdata/influxdb-java@f653e62) Easy to use try-with-resources, add README.md
- [`c7be9b0`](influxdata/influxdb-java@c7be9b0) Easy to use try-with-resources
- [`4590d18`](influxdata/influxdb-java@4590d18) - added automated SNAPSHOT publishing to Maven Central repository
- [`ce65a41`](influxdata/influxdb-java@ce65a41) - added automated SNAPSHOT publishing to Maven Central repository
- Additional commits viewable in [compare view](influxdata/influxdb-java@influxdb-java-2.10...influxdb-java-2.14)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=org.influxdb:influxdb-java&package-manager=gradle&previous-version=2.10&new-version=2.14)](https://dependabot.com/compatibility-score.html?dependency-name=org.influxdb:influxdb-java&package-manager=gradle&previous-version=2.10&new-version=2.14)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
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.

None yet

6 participants