From 600ea3978e293719548fb6785432ed69f1eb7faf Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Thu, 7 Oct 2021 15:05:22 +0200 Subject: [PATCH] Filebeat: Change compatibility test stage to test against previous minor instead of 7.11 (#28274) This changes the compatibility test for Filebeat modules to test with the previous released minor. Relates #26629 (cherry picked from commit 9806f9163d824632ebedce39cdb0f1e5383964b7) # Conflicts: # filebeat/Jenkinsfile.yml # testing/environments/prev-minor.yml # x-pack/filebeat/Jenkinsfile.yml --- filebeat/Jenkinsfile.yml | 11 ++++++++ testing/environments/prev-minor.yml | 38 +++++++++++++++++++++++++++ testing/environments/snapshot-oss.yml | 2 +- x-pack/filebeat/Jenkinsfile.yml | 11 ++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 testing/environments/prev-minor.yml diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 0cf61544a6f..b81428a2319 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -44,6 +44,17 @@ stages: pythonIntegTest: mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory +<<<<<<< HEAD +======= + 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 + withModule: true + stage: mandatory +>>>>>>> 9806f9163d (Filebeat: Change compatibility test stage to test against previous minor instead of 7.11 (#28274)) macos: mage: "mage build unitTest" platforms: ## override default label in this specific stage. diff --git a/testing/environments/prev-minor.yml b/testing/environments/prev-minor.yml new file mode 100644 index 00000000000..a4506188f6b --- /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.0 + 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.0 + 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.0 + healthcheck: + 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 a001b9119f3..5d1b8146957 100644 --- a/testing/environments/snapshot-oss.yml +++ b/testing/environments/snapshot-oss.yml @@ -29,7 +29,7 @@ services: kibana: image: docker.elastic.co/kibana/kibana-oss:7.15.1-3e6b9a63-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 diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index ef338263c6b..f3bacc58589 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -44,6 +44,17 @@ stages: pythonIntegTest: mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory +<<<<<<< HEAD +======= + 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 + withModule: true + stage: mandatory +>>>>>>> 9806f9163d (Filebeat: Change compatibility test stage to test against previous minor instead of 7.11 (#28274)) macos: mage: "mage build unitTest" platforms: ## override default label in this specific stage.