-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Only define Docker pkg tests if Docker is available #47640
Merged
pugnascotia
merged 50 commits into
elastic:master
from
pugnascotia:fix-docker-tests-on-gcp
Nov 4, 2019
Merged
Changes from 6 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
521d41d
Revert "Mute docker packaging tests (DockerTests)"
pugnascotia c01dd7b
Only define Docker pkg tests where appropriate
pugnascotia d2dccce
Fix lint error
pugnascotia 5eb2a28
Docs and refactoring
pugnascotia ec8b085
Enable IPv4 forwarding on ubuntu in 16.04
pugnascotia 1f48f44
Use host networking when building docker images
pugnascotia 560adb6
Address review feedback
pugnascotia 7212a9c
Exclude Docker distro tests per VM
pugnascotia de9bb33
Handle Docker version numbers
pugnascotia 2020084
Merge branch 'master' into fix-docker-tests-on-gcp
elasticmachine e8a920a
Only run Docker tests on some host OSs
pugnascotia 2d8ca75
Make /etc/os-release parsing better
pugnascotia 1684857
Try to fix Docker task generation
pugnascotia 1641b38
Add a debug stmt, figure out debian-8 issue
pugnascotia 54d322c
Merge branch 'master' into fix-docker-tests-on-gcp
elasticmachine 2d96534
Fix how we use data from /etc/os-release
pugnascotia 64051ed
Fix checkstyle
pugnascotia 6a64065
Trying to diagnose CI failures
pugnascotia 8cb1389
Still trying to diagnose failures on CI
pugnascotia b0e3a9e
Please, just print my debug info
pugnascotia a20b3d4
Please, just print my debug info
pugnascotia daec2ad
Still trying to debug
pugnascotia be25db4
Only define docker distros when Docker is available
pugnascotia 12bb939
Merge branch 'master' into fix-docker-tests-on-gcp
elasticmachine 31fec0b
Use host networking when building docker images
pugnascotia 5c785c7
Merge branch 'master' into fix-docker-tests-on-gcp
elasticmachine 2293017
Revert docker network change
pugnascotia 8c819fb
Workaround infra issue 15654
pugnascotia 55d4cfc
Merge remote-tracking branch 'upstream/master' into fix-docker-tests-…
pugnascotia b8d44c7
Increase docker pkg test timeouts
pugnascotia dc19fed
Merge remote-tracking branch 'upstream/master' into fix-docker-tests-…
pugnascotia e98e4bc
Tiny change to try and get CI to work
pugnascotia 0831884
Docker test fixes following JVM options work
pugnascotia 0a29d8d
Simplify how Docker test tasks are defined
pugnascotia 048832a
Reimplement Docker tests exclude list
pugnascotia 99ded1c
Remove sles-15 from .ci/dockerOnLinuxExclusions
pugnascotia 12bd9fb
Fix access modifiers in DockerUtils
pugnascotia 97fca15
Use project.exec to run commands in DockerUtils
pugnascotia 617f494
Fix
pugnascotia ffcf939
Fix JavaDoc ref
pugnascotia 0b49a7a
Don't always create a docker distribution
pugnascotia 611b914
Fix logic
pugnascotia aac11a4
Update .ci/dockerOnLinuxExclusions
pugnascotia e0010a6
Expand comment re: configuring Docker tasks for Vagrant
pugnascotia f189ca1
Merge remote-tracking branch 'upstream/master' into fix-docker-tests-…
pugnascotia 63a758d
Tweak logging
pugnascotia 3e8d10d
Add debugging statements
pugnascotia cedacee
Pointless change to get CI to run the right code
pugnascotia ef924fc
Various fixes to docker packaging test logic
pugnascotia 9d50aaa
Pointless change to try and get CI to run the right code
pugnascotia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property is a left over and it's my bad for not removing it yet. See #45034.
Please remove this property here together with the conditionals and the
ext.set('buildDocker'
from bellow it as it's not used, and make sure we don't mention it in any new code we add.The way this is meant to work is that docker is required if you need it to build something, trying to build that something without docker should fail. It's optional for anything involving testing.
We usually get around this by only calling
build
( which includesassemble
) on CI workers that have docker, and callingcheck
when they might not , which doesn't include a full assemble and only builds what it needs for the tests, if no tests can run nothing gets assembled. The logic is implemented in the test fixtures plugin.The docker rest tests are a special case that the test fixtures plugin doesn't fully handle, see
distribution/docker/build.gradle
that has this :We got into this situation because we have platforms for which we can't have docker in CI, but still want to run the rest of the tests. Ideally we would just require docker for development as we rely on it in some many ways these days. (Of course we would have to support test fixtures on mac and windows which we don't yet, but that's a different story).
The situation is a bit different here because we are able to pick when to run and when not to because we know what platform we are running against, but that's only when we are running against vagrant and the subprojects are actually in use. In this case the VMs will have docker as we install it in the Vagrant file, but the host also has to have it to build the image, which our bare metal workers do have, so we are ok to fail, since there's no way to test docker without having it installed.
On the GCP images, we may not have it, so we can't build nor test, anything docker related, so I think we need to keep the same semantics here, avoid pulling in the dependency to build the images and skip the docker related tests ( which we already do ), since this has to do with GCP it's similar to the rest of CI, as in we don't have a way of configuring the platforms that are ok not to have docker, so the only way to implement my earlier suggestion to have a list of platforms where it's ok not to have docker is in CI and it would be similar for every CI job and worker we have, not specific to packaging tests.
I think the easiest way to accomplish this is to skip configuring the distribution altogether in this case, similar to how we deal with docker rest tests.
We don't really care about not having docker on the host running the vagrant tests,
so I don't think we should do anything about it.
As sych the part of the PR that configures the
shouldTestDocker
ext property should be discarded.