From 7f93c361e13a9efb7fb96e16063c7a96a0623c3f Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Wed, 6 Oct 2021 11:49:08 +0200 Subject: [PATCH 1/3] Change 7.11-compat test to prev-minor test This changes the compatibility test for Filebeat modules to test with the previous released minor. Relates #26629 --- filebeat/Jenkinsfile.yml | 6 ++--- testing/environments/prev-minor.yml | 38 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 testing/environments/prev-minor.yml diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 55a296e9fdb0..9c26abb3b081 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -44,9 +44,9 @@ stages: pythonIntegTest: mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory - module-compat-7.11: - mage: >- ## Run module integration tests under ES 7.11 to ensure ingest pipeline compatibility. - STACK_ENVIRONMENT=7.11 + module-compat-prev-minor: + mage: >- ## Run module integration tests under previous minor of ES to ensure ingest pipeline compatibility. + STACK_ENVIRONMENT=prev-minor TESTING_FILEBEAT_SKIP_DIFF=1 PYTEST_ADDOPTS='-k test_modules' mage pythonIntegTest diff --git a/testing/environments/prev-minor.yml b/testing/environments/prev-minor.yml new file mode 100644 index 000000000000..917203c126b3 --- /dev/null +++ b/testing/environments/prev-minor.yml @@ -0,0 +1,38 @@ +# This is the previous minor for compatibility tests. + +version: '2.3' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.15 + healthcheck: + test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] + retries: 300 + interval: 1s + environment: + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + - "network.host=" + - "transport.host=127.0.0.1" + - "http.host=0.0.0.0" + - "xpack.security.enabled=false" + - "script.context.template.max_compilations_rate=unlimited" + - "script.context.ingest.cache_max_size=2000" + - "script.context.processor_conditional.cache_max_size=2000" + - "script.context.template.cache_max_size=2000" + - "action.destructive_requires_name=false" + + logstash: + image: docker.elastic.co/logstash/logstash:7.15 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] + retries: 600 + interval: 1s + volumes: + - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro + - ./docker/logstash/pki:/etc/pki:ro + + kibana: + image: docker.elastic.co/kibana/kibana:7.15 + healthcheck: + test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"] + retries: 600 + interval: 1s From 8b8e35b961f1601e71b0a20ad08b8e291b3db50d Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Wed, 6 Oct 2021 15:28:02 +0200 Subject: [PATCH 2/3] Fix --- testing/environments/prev-minor.yml | 6 +++--- x-pack/filebeat/Jenkinsfile.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testing/environments/prev-minor.yml b/testing/environments/prev-minor.yml index 917203c126b3..5ea3311a58ee 100644 --- a/testing/environments/prev-minor.yml +++ b/testing/environments/prev-minor.yml @@ -3,7 +3,7 @@ version: '2.3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.15 + image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0 healthcheck: test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 @@ -21,7 +21,7 @@ services: - "action.destructive_requires_name=false" logstash: - image: docker.elastic.co/logstash/logstash:7.15 + image: docker.elastic.co/logstash/logstash:7.15.0 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] retries: 600 @@ -31,7 +31,7 @@ services: - ./docker/logstash/pki:/etc/pki:ro kibana: - image: docker.elastic.co/kibana/kibana:7.15 + image: docker.elastic.co/kibana/kibana:7.15.0 healthcheck: test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"] retries: 600 diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index 09c837bccf65..0e32ddefc47b 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -44,9 +44,9 @@ stages: pythonIntegTest: mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory - module-compat-7.11: - mage: >- ## Run module integration tests under ES 7.11 to ensure ingest pipeline compatibility. - STACK_ENVIRONMENT=7.11 + module-compat-prev-minor: + mage: >- ## Run module integration tests under previous minor of ES to ensure ingest pipeline compatibility. + STACK_ENVIRONMENT=prev-minor TESTING_FILEBEAT_SKIP_DIFF=1 PYTEST_ADDOPTS='-k test_xpack_modules' mage pythonIntegTest From f0e3d5bc7439e2f5380df1e05987cc39c3e342b3 Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Wed, 6 Oct 2021 19:36:27 +0200 Subject: [PATCH 3/3] Fix Kibana health check in testing environment --- testing/environments/7.11.yml | 38 --------------------------- testing/environments/prev-minor.yml | 2 +- testing/environments/snapshot-oss.yml | 2 +- 3 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 testing/environments/7.11.yml diff --git a/testing/environments/7.11.yml b/testing/environments/7.11.yml deleted file mode 100644 index 7f93445987c7..000000000000 --- a/testing/environments/7.11.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This is the latest 7.11 - -version: '2.3' -services: - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.11.2 - healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] - retries: 300 - interval: 1s - environment: - - "ES_JAVA_OPTS=-Xms1g -Xmx1g" - - "network.host=" - - "transport.host=127.0.0.1" - - "http.host=0.0.0.0" - - "xpack.security.enabled=false" - - "script.context.template.max_compilations_rate=unlimited" - - "script.context.ingest.cache_max_size=2000" - - "script.context.processor_conditional.cache_max_size=2000" - - "script.context.template.cache_max_size=2000" - - "action.destructive_requires_name=false" - - logstash: - image: docker.elastic.co/logstash/logstash:7.11.2 - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] - retries: 600 - interval: 1s - volumes: - - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro - - ./docker/logstash/pki:/etc/pki:ro - - kibana: - image: docker.elastic.co/kibana/kibana:7.11.2 - healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"] - retries: 600 - interval: 1s diff --git a/testing/environments/prev-minor.yml b/testing/environments/prev-minor.yml index 5ea3311a58ee..a4506188f6bf 100644 --- a/testing/environments/prev-minor.yml +++ b/testing/environments/prev-minor.yml @@ -33,6 +33,6 @@ services: kibana: image: docker.elastic.co/kibana/kibana:7.15.0 healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"] + test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status?v8format=true | grep -q '\"overall\":{\"level\":\"available\"'"] retries: 600 interval: 1s diff --git a/testing/environments/snapshot-oss.yml b/testing/environments/snapshot-oss.yml index 759dd22753e3..d3a731eb1d86 100644 --- a/testing/environments/snapshot-oss.yml +++ b/testing/environments/snapshot-oss.yml @@ -33,7 +33,7 @@ services: kibana: image: docker.elastic.co/kibana/kibana:8.0.0-7e122dd9-SNAPSHOT healthcheck: - test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"] + test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status?v8format=true | grep -q '\"overall\":{\"level\":\"available\"'"] retries: 600 interval: 1s