GoogleCloudPlatform / openjdk-runtime

Google Cloud Platform OpenJDK Docker image
Apache License 2.0
61 stars 40 forks source link

structure testing docker volumes are convoluted and potentially problematic #147

Open balopat opened 7 years ago

balopat commented 7 years ago

I think we might need a bit of a redesign here, couldn't solve it quickly, so I'll document the problems I see.

Currently in our build we have the following participants:

Volumes and directories:

GCCB:

The problematic part is that both sibling-container volumes work currently because of the coincidental design overlap - host \workspace is directly mounted onto \workspace in the step-container. As soon as this symmetry breaks we have issues. The reason is that the "sibling-container" is talking to the docker daemon on the host and as such resolves directory based docker volumes from the host.

To see where this reliance already causes problem, let's have a look at the same directories in the container-builder-local case:

Structure tests fail with this setup.

The problem:

Not exactly sure about the best way to go. Couple of options:

balopat commented 7 years ago

@aslo @nkubala FYI, let me know what you guys think.

nkubala commented 7 years ago

Haha, good timing on this one: I'm in the middle of a major redesign of the structure tests as we speak, which will pull the test execution outside of a container. Check out https://github.com/GoogleCloudPlatform/runtimes-common/pull/332 for progress

balopat commented 7 years ago

awesome @nkubala, let's see how that shakes out, it looks promising! Also it seems that based on our conversation the container-builder-local might have support in the future to define workspace as a directory vs the sandbox volume only - that would help as well in our case (b/65417396)

aslo commented 7 years ago

Great work on this analysis! I @nkubala 's change looks promising.