-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Uptime] Update functional test directory to use a pinned version of package registry via docker #117736
[Uptime] Update functional test directory to use a pinned version of package registry via docker #117736
Conversation
…egistry via docker
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…dominiqueclarke/kibana into fix/synthetics-functional-tests
8e67a36
to
1348593
Compare
fbc13a6
to
f633c46
Compare
bd7c3ac
to
004b1dc
Compare
004b1dc
to
a242542
Compare
2017aef
to
9f9c8ba
Compare
Pinging @elastic/uptime (Team:uptime) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
// example: https://beats-ci.elastic.co/blue/organizations/jenkins/Ingest-manager%2Fpackage-storage/detail/snapshot/74/pipeline/257#step-302-log-1. | ||
// It should be updated any time there is a new Docker image published for the Snapshot Distribution of the Package Registry. | ||
export const dockerImage = | ||
'docker.elastic.co/package-registry/distribution:ffcbe0ba25b9bae09a671249cbb1b25af0aa1994'; |
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.
Who is responsible for keeping this up-to-date?
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.
Our team, whenever we want to add new tests that depend on a later version.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
…package registry via docker (elastic#117736) * update functional test directory to use a pinned version of package registry via docker * remove console log * adjust config * skip synthetics tests if no docker image * remove extra configs * move synthetics tests to a different directory * update tests * update tests * remove duplicate tests * update helpers Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/test/functional_synthetics/apps/uptime/synthetics_integration.ts
…on of package registry via docker (#117736) (#123823) * [Uptime] Update functional test directory to use a pinned version of package registry via docker (#117736) * update functional test directory to use a pinned version of package registry via docker * remove console log * adjust config * skip synthetics tests if no docker image * remove extra configs * move synthetics tests to a different directory * update tests * update tests * remove duplicate tests * update helpers Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/test/functional_synthetics/apps/uptime/synthetics_integration.ts * Update x-pack/test/functional_synthetics/apps/uptime/synthetics_integration.ts
Summary
Fixes #109260
Fixes #119265
Fixes #119266
Fixes #103390
Fixes #119783
Fixes #119785
Fixes #119782
Fixes #119781
Fixes #116980
This PR has been run 100 times in flaky test runner. Results: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/83#399dcf17-8cc5-48e6-99d4-8b18032e11a6
Please note, the one failure is from a different test suite.
The Elastic Synthetics Integration tests rely on retrieval of the Elastic Synthetics package. If these connections are made to a package registry deployment outside of Kibana CI, these tests can fail at any time for two reasons:
For that reason, we run a dockerized version of the package registry in Kibana CI. For this to work, our tests must run against a custom test configuration and be kept in a custom directory,
x-pack/test/functional_synthetics
.How to run the tests locally
Usually, having the test server and the test runner in two different shells is most efficient, as it is possible to keep the server running and only rerun the test runner as often as needed. To do so, in one shell in the main
kibana
directory, run:In another shell in the same directory, run
Port
12345
is used as an example here, it can be anything, but the environment variable has to be present for the tests to run at all.DockerServers service setup
We use the
DockerServers
service provided bykbn-test
. The documentation for this functionality can be found here:https://github.com/elastic/kibana/blob/master/packages/kbn-test/src/functional_test_runner/lib/docker_servers/README.md
The main configuration for the
DockerServers
service for our tests can be found inx-pack/test/functional_synthetics/config.ts
:Specify the arguments to pass to
docker run
:-v
mounts local paths into the docker image. The first one puts a custom configuration file into the correct place in the docker container, the second one mounts a directory containing additional packages.Specify the docker image to use
This image contains the content of
docker.elastic.co/package-registry/package-registry:master
on June 26 2020. The image used here should be stable, i.e. usingmaster
would defeat the purpose of having a stable set of packages to be used in Kibana CI.Packages available for testing
The containerized package registry contains a set of packages which should be sufficient to run tests. The list of the packages are logged to the console when the docker container is initialized during testing.
Some DockerServers background
For the
DockerServers
servers to run correctly in CI, theFLEET_PACKAGE_REGISTRY_PORT
environment variable needs to be under control of the CI environment. The reason behind this: it is possible that several versions of our tests are run in parallel on the same worker in Jenkins, and if we used a hard-coded port number here, those tests would run into port conflicts. (This is also the case for a few other ports, and the setup happens invars/kibanaPipeline.groovy
).Also, not every developer has
docker
installed on their workstation, so it must be possible to run the testsuite as a whole withoutdocker
, and preferably this should be the default behaviour. Therefore, ourDockerServers
service is only enabled whenFLEET_PACKAGE_REGISTRY_PORT
is set. This needs to be checked in every test like this: