Skip to content

Commit

Permalink
rename config var in gha
Browse files Browse the repository at this point in the history
  • Loading branch information
findingrish committed Jul 26, 2024
1 parent 3ac2385 commit 7c34af3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/reusable-revised-its.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ on:
AWS_SECRET_ACCESS_KEY:
required: false
type: string
BACKWARD_INCOMPATIBILITY_IT_ENABLED:
BACKWARD_COMPATIBILITY_IT_ENABLED:
required: false
type: string
default: false
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Retrieve previous version cached docker image
id: docker-restore-previous-version
if: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED == 'true' }}
if: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED == 'true' }}
uses: actions/cache/restore@v4
with:
key: druid-container-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz-${{ github.sha }}
Expand All @@ -137,7 +137,7 @@ jobs:
if: steps.docker-restore.outputs.cache-hit != 'true' || steps.maven-restore.outputs.cache-hit != 'true'
env:
docker-restore: ${{ toJson(steps.docker-restore.outputs) }}
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED }}
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 }}
Expand All @@ -149,7 +149,7 @@ jobs:
docker save "$DRUID_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ inputs.build_jdk }}.tar.gz
- name: Save previous version docker image
if: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED == 'true' && (steps.docker-restore.outputs.cache-hit != 'true' || steps.maven-restore.outputs.cache-hit != 'true') }}
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: |
Expand All @@ -169,15 +169,15 @@ jobs:
docker images
- name: Load previous version docker image
if: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED == 'true' }}
if: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED == 'true' }}
run: |
docker load --input druid-container-jdk${{ inputs.build_jdk }}-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz
docker images
- name: Run IT
id: run-it
env:
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED }}
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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/revised-its.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name: "Revised ITs workflow"
on:
workflow_call:
inputs:
BACKWARD_INCOMPATIBILITY_IT_ENABLED:
BACKWARD_COMPATIBILITY_IT_ENABLED:
description: "Flag for backward compatibility IT"
required: false
default: false
Expand Down Expand Up @@ -101,15 +101,15 @@ jobs:
backward-compatibility-it:
needs: changes
uses: ./.github/workflows/reusable-revised-its.yml
if: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED == 'true' && (needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true') }}
if: ${{ inputs.BACKWARD_COMPATIBILITY_IT_ENABLED == 'true' && (needs.changes.outputs.core == 'true' || needs.changes.outputs.common-extensions == 'true') }}
with:
build_jdk: 8
runtime_jdk: 8
use_indexer: MiddleManager
script: ./it.sh github BackwardIncompatibility
it: BackwardIncompatibility
mysql_driver: com.mysql.jdbc.Driver
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ inputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED }}
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 }}
18 changes: 9 additions & 9 deletions .github/workflows/unit-and-integration-tests-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ concurrency:
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_INCOMPATIBILITY_IT_ENABLED: true
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
#BACKWARD_COMPATIBILITY_IT_ENABLED: true
#DRUID_PREVIOUS_IT_IMAGE_NAME: org.apache.druid.integration-tests/test:30.0.0

jobs:
Expand All @@ -60,12 +60,12 @@ jobs:
- name: Set new environment variable
run: |
if [ -n "${{ env.DRUID_PREVIOUS_VERSION }}" ]; then
echo "export BACKWARD_INCOMPATIBILITY_IT_ENABLED=true" >> $GITHUB_ENV
echo "export BACKWARD_COMPATIBILITY_IT_ENABLED=true" >> $GITHUB_ENV
else
echo "export BACKWARD_INCOMPATIBILITY_IT_ENABLED=false" >> $GITHUB_ENV
echo "export BACKWARD_COMPATIBILITY_IT_ENABLED=false" >> $GITHUB_ENV
fi
echo "export DRUID_PREVIOUS_IT_IMAGE_NAME=org.apache.druid.integration-tests/test:${{ env.DRUID_PREVIOUS_VERSION }}" >> $GITHUB_ENV
echo "New environment variable: $DRUID_PREVIOUS_IT_IMAGE_NAME, $BACKWARD_INCOMPATIBILITY_IT_ENABLED"
echo "New environment variable: $DRUID_PREVIOUS_IT_IMAGE_NAME, $BACKWARD_COMPATIBILITY_IT_ENABLED"
build:
needs: set-new-env-var
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Container build
env:
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ env.BACKWARD_INCOMPATIBILITY_IT_ENABLED }}
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 }}
Expand All @@ -144,7 +144,7 @@ jobs:
docker save "$DRUID_IT_IMAGE_NAME" | gzip > druid-container-jdk${{ matrix.jdk }}.tar.gz
- name: Save previous version docker image
if: ${{ env.BACKWARD_INCOMPATIBILITY_IT_ENABLED == 'true' }}
if: ${{ env.BACKWARD_COMPATIBILITY_IT_ENABLED == 'true' }}
run: |
docker tag ${{ env.DRUID_PREVIOUS_IT_IMAGE_NAME }} ${{ env.DRUID_PREVIOUS_IT_IMAGE_NAME }}-jdk${{ matrix.jdk }}-version${{ env.DRUID_PREVIOUS_VERSION }}
echo ${{ env.DRUID_PREVIOUS_IT_IMAGE_NAME }}
Expand Down Expand Up @@ -183,10 +183,10 @@ jobs:
expose-vars:
runs-on: ubuntu-latest
outputs:
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ env.BACKWARD_INCOMPATIBILITY_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 }}
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ BACKWARD_COMPATIBILITY_IT_ENABLED }}
DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ DRUID_PREVIOUS_IT_IMAGE_NAME }}
steps:
- run: echo "Exposing env vars"

Expand All @@ -195,7 +195,7 @@ jobs:
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
uses: ./.github/workflows/revised-its.yml
with:
BACKWARD_INCOMPATIBILITY_IT_ENABLED: ${{ needs.expose-vars.outputs.BACKWARD_INCOMPATIBILITY_IT_ENABLED }}
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ needs.expose-vars.outputs.BACKWARD_COMPATIBILITY_IT_ENABLED }}
DRUID_PREVIOUS_VERSION: ${{ needs.expose-vars.outputs.DRUID_PREVIOUS_VERSION }}
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ needs.expose-vars.outputs.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ needs.expose-vars.outputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}

0 comments on commit 7c34af3

Please sign in to comment.