Skip to content
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

Backward Incompatibility IT #16743

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ca33d8b
Fix build
findingrish Mar 14, 2024
0395722
Merge branch 'master' of github.com:findingrish/druid
findingrish May 2, 2024
1598bf9
Merge remote-tracking branch 'upstream/master'
findingrish May 3, 2024
26eb44d
Merge remote-tracking branch 'upstream/master'
findingrish May 6, 2024
81dc604
Merge remote-tracking branch 'upstream/master'
findingrish May 8, 2024
4a63cc8
Merge remote-tracking branch 'upstream/master'
findingrish May 17, 2024
49e14c6
Merge remote-tracking branch 'upstream/master'
findingrish Jun 25, 2024
4943604
Merge remote-tracking branch 'upstream/master'
findingrish Jun 27, 2024
71c492e
Merge remote-tracking branch 'upstream/master'
findingrish Jul 4, 2024
820dc38
Merge remote-tracking branch 'upstream/master'
findingrish Jul 9, 2024
23da34a
Test changes
findingrish Jul 15, 2024
cef9323
Minor change
findingrish Jul 15, 2024
5d3aa91
GHA changes
findingrish Jul 16, 2024
d04ffbc
minor change
findingrish Jul 16, 2024
814c7ed
test changes
findingrish Jul 16, 2024
fb9ae06
temporarily disable static-checks and codeql
findingrish Jul 16, 2024
82ee40a
disable checks
findingrish Jul 16, 2024
da2ce1b
test
findingrish Jul 16, 2024
df01f4e
minor change
findingrish Jul 16, 2024
c2ba719
test
findingrish Jul 16, 2024
499eee9
test
findingrish Jul 16, 2024
ffe363d
test
findingrish Jul 16, 2024
fe73715
test
findingrish Jul 16, 2024
1800bfb
test
findingrish Jul 16, 2024
5e8e56a
test
findingrish Jul 16, 2024
a8d2c68
test
findingrish Jul 16, 2024
7575570
test
findingrish Jul 16, 2024
ce9d240
test
findingrish Jul 16, 2024
b3b2072
test
findingrish Jul 16, 2024
d7120e8
test
findingrish Jul 16, 2024
3a5e611
test
findingrish Jul 16, 2024
c5a145d
test
findingrish Jul 16, 2024
984657f
Revert some changes
findingrish Jul 17, 2024
86ef56f
Add test under BackwardCompatibility group
findingrish Jul 17, 2024
96f212b
debug unified it script
findingrish Jul 18, 2024
b029672
static check failures
findingrish Jul 18, 2024
8ee9f2a
Debug GHA: restrict static-checks to run on only java8
findingrish Jul 18, 2024
35c838d
test
findingrish Jul 18, 2024
86feba4
test
findingrish Jul 18, 2024
133edfe
test
findingrish Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/reusable-revised-its.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ on:
AWS_SECRET_ACCESS_KEY:
required: false
type: string
BACKWARD_COMPATIBILITY_IT_ENABLED:
description: "Flag for backward compatibility IT"
required: true
type: string
DRUID_PREVIOUS_VERSION:
description: "Previous druid versions to run the test against."
required: true
type: string
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL:
description: "URL to download the previous druid version."
required: true
type: string
DRUID_PREVIOUS_IT_IMAGE_NAME:
description: "Druid previous version image name."
required: true
type: string

env:
MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }} # Used by tests to connect to metadata store directly.
Expand All @@ -68,6 +84,10 @@ env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
DOCKER_CLIENT_TIMEOUT: 120
COMPOSE_HTTP_TIMEOUT: 120
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED }}
DRUID_PREVIOUS_VERSION: ${{ inputs.DRUID_PREVIOUS_VERSION }}
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ inputs.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ inputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}

jobs:
test: # GitHub job that runs a given revised/new IT against retrieved cached druid docker image
Expand Down Expand Up @@ -122,6 +142,15 @@ jobs:
echo $DRUID_IT_IMAGE_NAME
docker save "$DRUID_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ inputs.build_jdk }}.tar.gz

- name: Save old version docker image
if: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED == "true" }} && (steps.docker-restore.outputs.cache-hit != 'true' || steps.maven-restore.outputs.cache-hit != 'true')
env:
docker-restore: ${{ toJson(steps.docker-restore.outputs) }}
run: |
docker tag $DRUID_PREVIOUS_IT_IMAGE_NAME $DRUID_PREVIOUS_IT_IMAGE_NAME-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}
echo $DRUID_PREVIOUS_IT_IMAGE_NAME
docker save "$DRUID_PREVIOUS_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz

- name: Stop and remove docker containers
run: |
echo "Force stopping all containers and pruning"
Expand All @@ -133,6 +162,11 @@ jobs:
docker load --input druid-container-jdk${{ inputs.build_jdk }}.tar.gz
docker images

- name: Load previous version docker image
if: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED == "true" }}
run: |
docker load --input druid-container-jdk8-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz

- name: Run IT
id: run-it
run: ${{ inputs.script }}
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/revised-its.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
name: "Revised ITs workflow"
on:
workflow_call:
inputs:
BACKWARD_COMPATIBILITY_IT_ENABLED:
description: "Flag for backward compatibility IT"
required: true
type: string
DRUID_PREVIOUS_VERSION:
description: "Previous druid versions to run the test against."
required: true
type: string
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL:
description: "URL to download the previous druid version."
required: true
type: string
DRUID_PREVIOUS_IT_IMAGE_NAME:
description: "Druid previous version image name."
required: true
type: string
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -50,7 +67,8 @@ jobs:
matrix:
#jdk: [8, 11, 17]
jdk: [8]
it: [HighAvailability, MultiStageQuery, Catalog, BatchIndex, MultiStageQueryWithMM, InputSource, InputFormat, Security, Query]
#it: [HighAvailability, MultiStageQuery, Catalog, BatchIndex, MultiStageQueryWithMM, InputSource, InputFormat, Security, Query, BackwardCompatibility]
it: [BackwardCompatibility]
#indexer: [indexer, middleManager]
indexer: [middleManager]
uses: ./.github/workflows/reusable-revised-its.yml
Expand All @@ -62,11 +80,15 @@ jobs:
script: ./it.sh github ${{ matrix.it }}
it: ${{ matrix.it }}
mysql_driver: com.mysql.jdbc.Driver
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED }}
DRUID_PREVIOUS_VERSION: ${{ inputs.DRUID_PREVIOUS_VERSION }}
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ inputs.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ inputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}

s3-deep-storage-minio:
needs: changes
uses: ./.github/workflows/reusable-revised-its.yml
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true' }}
if: false #${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true' }}
with:
build_jdk: 8
runtime_jdk: 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '8', '11', '17', '21' ]
java: [ '8' ]
runs-on: ubuntu-latest
steps:
- name: checkout branch
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/unit-and-integration-tests-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,26 @@ on:
- '[0-9]+.[0-9]+.[0-9]+' # release branches
- '[0-9]+.[0-9]+.[0-9]+-[A-Za-z0-9]+' # release branches


concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}' # group workflows only on pull_requests and not on branch commits
cancel-in-progress: true

env:
MYSQL_DRIVER_CLASSNAME: com.mysql.jdbc.Driver # Used to set druid config in docker image for revised ITs
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
BACKWARD_COMPATIBILITY_IT_ENABLED: false
DRUID_PREVIOUS_VERSION: 30.0.0
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: https://dlcdn.apache.org/druid/30.0.0/apache-druid-30.0.0-bin.tar.gz
DRUID_PREVIOUS_IT_IMAGE_NAME: org.apache.druid.integration-tests/test:30.0.0

jobs:
build:
name: "build (jdk${{ matrix.jdk }})"
strategy:
fail-fast: false
matrix:
jdk: [ '8', '11', '17', '21' ]
jdk: [ '8' ]
runs-on: ubuntu-latest
steps:
- name: Checkout branch
Expand Down Expand Up @@ -111,6 +116,13 @@ jobs:
echo $DRUID_IT_IMAGE_NAME
docker save "$DRUID_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ matrix.jdk }}.tar.gz

# - name: Save old version docker image
# if: ${{ env.BACKWARD_COMPATIBILITY_IT_ENABLED == "true" }}
# run: |
# docker tag $DRUID_PREVIOUS_IT_IMAGE_NAME $DRUID_PREVIOUS_IT_IMAGE_NAME-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}
# echo $DRUID_PREVIOUS_IT_IMAGE_NAME
# docker save "$DRUID_PREVIOUS_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz

unit-tests-phase2:
strategy:
fail-fast: false
Expand All @@ -119,12 +131,13 @@ jobs:
name: "unit tests (jdk${{ matrix.jdk }}, sql-compat=true)"
uses: ./.github/workflows/unit-tests.yml
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
if: false #${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
with:
jdk: ${{ matrix.jdk }}
sql_compatibility: true

unit-tests:
if: false
strategy:
fail-fast: false
matrix:
Expand All @@ -138,10 +151,15 @@ jobs:

standard-its:
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
if: false #${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
uses: ./.github/workflows/standard-its.yml

revised-its:
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
if: ${{ always() }} #${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
uses: ./.github/workflows/revised-its.yml
# with:
# BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ env.BACKWARD_COMPATIBILITY_IT_ENABLED }}
# DRUID_PREVIOUS_VERSION: ${{ env.DRUID_PREVIOUS_VERSION }}
# DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ env.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
# DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ env.DRUID_PREVIOUS_IT_IMAGE_NAME }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

networks:
druid-it-net:
name: druid-it-net
ipam:
config:
- subnet: 172.172.172.0/24

services:
zookeeper:
extends:
file: ../Common/dependencies.yaml
service: zookeeper

metadata:
extends:
file: ../Common/dependencies.yaml
service: metadata

coordinator:
extends:
file: ../Common/druid.yaml
service: coordinator
image: ${DRUID_PREVIOUS_IT_IMAGE_NAME}
container_name: coordinator
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
# The frequency with which the coordinator polls the database
# for changes. The DB population code has to wait at least this
# long for the coordinator to notice changes.
- druid_manager_segments_pollDuration=PT5S
- druid_coordinator_period=PT10S
depends_on:
- zookeeper
- metadata

overlord:
extends:
file: ../Common/druid.yaml
service: overlord
image: ${DRUID_PREVIOUS_IT_IMAGE_NAME}
container_name: overlord
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
depends_on:
- zookeeper
- metadata

broker:
extends:
file: ../Common/druid.yaml
service: broker
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
depends_on:
- zookeeper

router:
extends:
file: ../Common/druid.yaml
service: router
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
depends_on:
- zookeeper

historical:
extends:
file: ../Common/druid.yaml
service: historical
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
depends_on:
- zookeeper

middlemanager:
extends:
file: ../Common/druid.yaml
service: middlemanager
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
volumes:
# Test data
- ../../resources:/resources
depends_on:
- zookeeper

kafka:
extends:
file: ../Common/dependencies.yaml
service: kafka
depends_on:
- zookeeper
6 changes: 3 additions & 3 deletions integration-tests-ex/cases/cluster/Common/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
# See https://hub.docker.com/_/zookeeper
zookeeper:
# Uncomment the following when running on Apple Silicon processors:
# platform: linux/x86_64
platform: linux/x86_64
image: zookeeper:${ZK_VERSION}
container_name: zookeeper
labels:
Expand All @@ -46,7 +46,7 @@ services:
kafka:
image: bitnami/kafka:${KAFKA_VERSION}
container_name: kafka
# platform: linux/x86_64
platform: linux/x86_64
labels:
druid-int-test: "true"
ports:
Expand All @@ -73,7 +73,7 @@ services:
# The image will intialize the user and DB upon first start.
metadata:
# Uncomment the following when running on Apple Silicon processors:
# platform: linux/x86_64
platform: linux/x86_64
image: mysql:$MYSQL_IMAGE_VERSION
container_name: metadata
labels:
Expand Down
9 changes: 9 additions & 0 deletions integration-tests-ex/cases/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,15 @@
<it.category>GcsDeepStorage</it.category>
</properties>
</profile>
<profile>
<id>IT-BackwardCompatibility</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<it.category>BackwardCompatibility</it.category>
</properties>
</profile>
<profile>
<id>docker-tests</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.druid.testsEx.BackwardCompatibility;

import org.apache.druid.testsEx.categories.BackwardCompatibility;
import org.apache.druid.testsEx.config.DruidTestRunner;
import org.apache.druid.testsEx.indexer.IndexerTest;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

@RunWith(DruidTestRunner.class)
@Category({BackwardCompatibility.class})
public class ITBackwardCompatibilityIndexerTest extends IndexerTest
{
}
Loading
Loading