From fc2ebc36b717bed4055a82f35a53d1d75efdea0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20=C5=A0idlauskas?= Date: Fri, 17 Feb 2023 14:27:02 +0200 Subject: [PATCH 1/3] ES: do not set type for v7 --- common/elasticsearch/client_v7.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/elasticsearch/client_v7.go b/common/elasticsearch/client_v7.go index 371a17ab26f..b9dd67010fc 100644 --- a/common/elasticsearch/client_v7.go +++ b/common/elasticsearch/client_v7.go @@ -526,14 +526,12 @@ func (v *v7BulkProcessor) Add(request *GenericBulkableAddRequest) { case BulkableDeleteRequest: req = elastic.NewBulkDeleteRequest(). Index(request.Index). - Type(request.Type). Id(request.ID). VersionType(request.VersionType). Version(request.Version) case BulkableIndexRequest: req = elastic.NewBulkIndexRequest(). Index(request.Index). - Type(request.Type). Id(request.ID). VersionType(request.VersionType). Version(request.Version). @@ -544,7 +542,6 @@ func (v *v7BulkProcessor) Add(request *GenericBulkableAddRequest) { req = elastic.NewBulkIndexRequest(). OpType("create"). Index(request.Index). - Type(request.Type). Id(request.ID). VersionType("internal"). Doc(request.Doc) From 9b82a58f6bfda71714c1c6778ea515544d8f0aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20=C5=A0idlauskas?= Date: Fri, 17 Feb 2023 14:50:24 +0200 Subject: [PATCH 2/3] add buildkite job --- .buildkite/pipeline-pull-request.yml | 15 +++- .../buildkite/docker-compose-opensearch2.yml | 70 +++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 docker/buildkite/docker-compose-opensearch2.yml diff --git a/.buildkite/pipeline-pull-request.yml b/.buildkite/pipeline-pull-request.yml index f4a36f596a4..728bb4600b6 100644 --- a/.buildkite/pipeline-pull-request.yml +++ b/.buildkite/pipeline-pull-request.yml @@ -62,7 +62,20 @@ steps: - docker-compose#v3.0.0: run: integration-test-cassandra config: docker/buildkite/docker-compose-es7.yml - + - label: ":golang: integration test with cassandra with OpenSearch v2" + agents: + queue: "workers" + docker: "*" + command: "make cover_integration_profile" + artifact_paths: + - ".build/coverage/*.out" + retry: + automatic: + limit: 1 + plugins: + - docker-compose#v3.0.0: + run: integration-test-cassandra + config: docker/buildkite/docker-compose-opensearch2.yml - label: ":golang: integration ndc test with cassandra" agents: queue: "workers" diff --git a/docker/buildkite/docker-compose-opensearch2.yml b/docker/buildkite/docker-compose-opensearch2.yml new file mode 100644 index 00000000000..847120059e1 --- /dev/null +++ b/docker/buildkite/docker-compose-opensearch2.yml @@ -0,0 +1,70 @@ +version: "3.5" + +services: + cassandra: + image: cassandra:3.11 + networks: + services-network: + aliases: + - cassandra + + zookeeper: + image: wurstmeister/zookeeper:3.4.6 + networks: + services-network: + aliases: + - zookeeper + + kafka: + image: wurstmeister/kafka:2.12-2.1.1 + depends_on: + - zookeeper + networks: + services-network: + aliases: + - kafka + environment: + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 + KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + + elasticsearch: + image: opensearchproject/opensearch:2.5.0 + networks: + services-network: + aliases: + - elasticsearch + environment: + - discovery.type=single-node + + integration-test-cassandra: + build: + context: ../../ + dockerfile: ./docker/buildkite/Dockerfile + environment: + - "CASSANDRA=1" + - "CASSANDRA_SEEDS=cassandra" + - "ES_SEEDS=elasticsearch" + - "KAFKA_SEEDS=kafka" + - "TEST_TAG=esintegration" + - "ES_VERSION=v7" + - BUILDKITE_AGENT_ACCESS_TOKEN + - BUILDKITE_JOB_ID + - BUILDKITE_BUILD_ID + - BUILDKITE_BUILD_NUMBER + depends_on: + - cassandra + - elasticsearch + - kafka + volumes: + - ../../:/cadence + - /usr/bin/buildkite-agent:/usr/bin/buildkite-agent + networks: + services-network: + aliases: + - integration-test + +networks: + services-network: + name: services-network + driver: bridge From b872455e14dcfa09a1d1b89f07303bafe26fd311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20=C5=A0idlauskas?= Date: Fri, 17 Feb 2023 15:53:23 +0200 Subject: [PATCH 3/3] disable os2 security --- docker/buildkite/docker-compose-opensearch2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/buildkite/docker-compose-opensearch2.yml b/docker/buildkite/docker-compose-opensearch2.yml index 847120059e1..b0e52007781 100644 --- a/docker/buildkite/docker-compose-opensearch2.yml +++ b/docker/buildkite/docker-compose-opensearch2.yml @@ -36,6 +36,7 @@ services: - elasticsearch environment: - discovery.type=single-node + - plugins.security.disabled=true integration-test-cassandra: build: