Skip to content

fix imports

fix imports #723

name: Build and test image
on:
push:
workflow_dispatch:
concurrency:
group: falkordb-node-branch-${{ github.ref_name }}
cancel-in-progress: false
env:
NODE_IMAGE_NAME: falkordb-node
CLUSTER_IMAGE_NAME: falkordb-cluster
CLUSTER_REBALANCE_IMAGE_NAME: falkordb-cluster-rebalance
FALKORDB_VERSION: v4.2.1
FREE_PLAN_NAME: free-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
PRO_PLAN_NAME: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
ENTERPRISE_PLAN_NAME: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
GCP_NETWORK_NAME: gcp-network-${{ github.run_id }}
AWS_NETWORK_NAME: aws-network-${{ github.run_id }}
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- dockerfile: ./falkordb-node/Dockerfile
image-name: falkordb-node
- dockerfile: ./falkordb-cluster/Dockerfile
image-name: falkordb-cluster
- dockerfile: ./falkordb-cluster-rebalance/Dockerfile
image-name: falkordb-cluster-rebalance
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: FALKORDB_VERSION=${{ env.FALKORDB_VERSION }}
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: falkordb/${{ matrix.image-name }}:dev-${{ github.event.head_commit.id }}
omnistrate-update-plans:
needs: build-and-push
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
plans:
- service-name: FalkorDB
plan-name: FalkorDB Free
file: omnistrate.free.yaml
key: free
tier-name: free-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
- service-name: FalkorDB
plan-name: FalkorDB Pro
file: omnistrate.pro.yaml
key: pro
tier-name: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
- service-name: FalkorDB
plan-name: FalkorDB Enterprise
file: omnistrate.enterprise.yaml
key: enterprise
tier-name: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Replace Variables
run: |
sed -i 's/$GcpProjectId/${{ vars.GCP_PROJECT_ID }}/g' ${{ matrix.plans.file }}
sed -i 's/$GcpProjectNumber/${{ vars.GCP_PROJECT_NUMBER }}/g' ${{ matrix.plans.file }}
sed -i 's/$GcpServiceAccountEmail/${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}/g' ${{ matrix.plans.file }}
sed -i 's/$AwsAccountId/${{ vars.AWS_ACCOUNT_ID }}/g' ${{ matrix.plans.file }}
sed -i 's|$AwsBootstrapRoleAccountArn|${{ vars.AWS_BOOTSTRAP_ROLE_ACCOUNT_ARN }}|g' ${{ matrix.plans.file }}
sed -i 's/$FalkorDBNodeImage/falkordb\/${{ env.NODE_IMAGE_NAME }}:dev-${{ github.event.head_commit.id }}/g' ${{ matrix.plans.file }}
sed -i 's/$FalkorDBClusterImage/falkordb\/${{ env.CLUSTER_IMAGE_NAME }}:dev-${{ github.event.head_commit.id }}/g' ${{ matrix.plans.file }}
sed -i 's/$FalkorDBClusterRebalanceImage/falkordb\/${{ env.CLUSTER_REBALANCE_IMAGE_NAME }}:dev-${{ github.event.head_commit.id }}/g' ${{ matrix.plans.file }}
sed -i 's/${{ matrix.plans.plan-name }}/${{ matrix.plans.tier-name }}/g' ${{ matrix.plans.file }}
- name: Upload yaml as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.plans.file }}
path: ${{ matrix.plans.file }}
- name: Create FALKORDB_PASSWORD/ADMIN_PASSWORD files
run: |
export sec=$(grep '^secrets' omnistrate.free.yaml)
if [[ -n "$sec" ]];then
mkdir -p secrets || { echo "Failed to create secrets directory"; exit 1; }
echo '{{ $var.falkordbPassword }}' > ./secrets/falkordbpassword || { echo "Failed to write falkordbpassword"; exit 1; }
echo '{{ $func.random(string, 16, $sys.deterministicSeedValue) }}' > ./secrets/adminpassword || { echo "Failed to write adminpassword"; exit 1; }
else
echo "secrets option was not used"
exit 0
fi
- name: Update Omnistrate plan
uses: ./.github/actions/update-omnistrate-plan
id: update_omnistrate_plan
with:
username: ${{ secrets.OMNISTRATE_USERNAME }}
password: ${{ secrets.OMNISTRATE_PASSWORD }}
file: ${{ matrix.plans.file }}
service-name: ${{ matrix.plans.service-name }}
environment: testing
environment-type: qa
create-custom-networks:
needs: omnistrate-update-plans
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Omnistrate Custom Network - GCP
uses: ./.github/actions/create-omnistrate-custom-network
id: create_custom_network_gcp
with:
username: ${{ secrets.OMNISTRATE_USERNAME }}
password: ${{ secrets.OMNISTRATE_PASSWORD }}
cloud_provider: gcp
region: us-central1
cidr: "10.0.0.0/20"
name: ${{ env.GCP_NETWORK_NAME}}
- name: Create Omnistrate Custom Network - AWS
uses: ./.github/actions/create-omnistrate-custom-network
id: create_custom_network_aws
with:
username: ${{ secrets.OMNISTRATE_USERNAME }}
password: ${{ secrets.OMNISTRATE_PASSWORD }}
cloud_provider: aws
region: us-east-2
cidr: "10.0.0.0/20"
name: ${{ env.AWS_NETWORK_NAME }}
test:
needs: create-custom-networks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
instances:
###################### GCP ######################
- name: Free - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: free-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'free' --replica-id 'node-f-0' --instance-name 'test-free-failover' --instance-description 'test-free-failover' --instance-type 'none' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/Standalone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --replica-id 'node-s-0' --instance-name 'test-standalone-failover' --instance-description 'test-standalone-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/SingleZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-sz-failover' --instance-description 'test-sz-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/MultiZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --instance-name 'test-mz-failover' --instance-description 'test-mz-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/Standalone - GCP/us-central1 - Failover & Persistence With TLS
if: "true"
testFile: test_standalone.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --replica-id 'node-s-0' --instance-name 'test-standalone-failover-tls' --instance-description 'test-standalone-failover-tls' --instance-type 'e2-medium' --storage-size '30' --tls --rdb-config 'medium' --aof-config 'always'"
- name: PRO/SingleZone - GCP/us-central1 - Failover & Persistence With TLS
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-sz-failover-tls' --instance-description 'test-sz-failover-tls' --instance-type 'e2-medium' --storage-size '30' --tls --rdb-config 'medium' --aof-config 'always'"
- name: PRO/MultiZone - GCP/us-central1 - Failover & Persistence With TLS
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --instance-name 'test-mz-failover-tls' --instance-description 'test-mz-failover-tls' --instance-type 'e2-medium' --storage-size '30' --tls --rdb-config 'medium' --aof-config 'always'"
- name: PRO/Standalone - GCP/us-central1 - Update Memory
if: "true"
testFile: test_update_memory.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --instance-name 'test-standalone-update-memory' --instance-description 'test-standalone-update-memory' --instance-type 'e2-medium' --new-instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/SingleZone - GCP/us-central1 - Update Memory
if: "true"
testFile: test_update_memory.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-replication-update-memory' --instance-description 'test-replication-update-memory' --instance-type 'e2-medium' --new-instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/ClusterSingleZone - GCP/us-central1 - Update Memory
if: "true"
testFile: test_update_memory.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-update-memory' --instance-description 'test-cluster-update-memory' --instance-type 'e2-medium' --new-instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --cluster-replicas '1' --host-count '6'"
- name: PRO/Standalone - GCP/us-central1 - Upgrade Version
if: ${{ contains(github.ref, 'refs/tags/v') || contains(github.ref, 'main') }}
testFile: test_upgrade_version.py
tierName: pro-main
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --instance-name 'test-standalone-upgrade' --instance-description 'test-standalone-upgrade' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/SingleZone - GCP/us-central1 - Upgrade Version
if: ${{ contains(github.ref, 'refs/tags/v') || contains(github.ref, 'main') }}
testFile: test_upgrade_version.py
tierName: pro-main
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-replication-upgrade' --instance-description 'test-replication-upgrade' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/ClusterSingleZone - GCP/us-central1 - Upgrade Version
if: ${{ contains(github.ref, 'refs/tags/v') || contains(github.ref, 'main') }}
testFile: test_upgrade_version.py
tierName: pro-main
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-upgrade' --instance-description 'test-cluster-upgrade' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --cluster-replicas '1' --host-count '6'"
- name: PRO/ClusterSingleZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --replica-id 'cluster-sz-1' --instance-name 'test-cluster-sz-failover' --instance-description 'test-cluster-sz-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1'"
- name: PRO/ClusterMultiZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Multi-Zone' --replica-id 'cluster-mz-1' --instance-name 'test-cluster-mz-failover' --instance-description 'test-cluster-mz-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution"
- name: PRO/ClusterSingleZone - GCP/us-central1 - Failover & Persistence With TLS
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --replica-id 'cluster-sz-1' --instance-name 'test-cluster-sz-failover-tls' --instance-description 'test-cluster-sz-failover' --instance-type 'e2-medium' --storage-size '30' --tls --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1'"
- name: PRO/ClusterMultiZone - GCP/us-central1 - Failover & Persistence With TLS
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Multi-Zone' --replica-id 'cluster-mz-1' --instance-name 'test-cluster-mz-failover-tls' --instance-description 'test-cluster-mz-failover' --instance-type 'e2-medium' --storage-size '30' --tls --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution"
# Enterprise
- name: Enterprise/Standalone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --replica-id 'node-s-0' --instance-name 'test-standalone-enterprise-failover' --instance-description 'test-standalone-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=gcp-network-${{ github.run_id }}"
- name: Enterprise/SingleZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-sz-enterprise-failover' --instance-description 'test-sz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=gcp-network-${{ github.run_id }}"
- name: Enterprise/MultiZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --instance-name 'test-mz-enterprise-failover' --instance-description 'test-mz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=gcp-network-${{ github.run_id }}"
- name: Enterprise/ClusterSingleZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --replica-id 'cluster-sz-0' --instance-name 'test-cluster-sz-enterprise-failover' --instance-description 'test-cluster-sz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --custom-network=gcp-network-${{ github.run_id }}"
- name: Enterprise/ClusterMultiZone - GCP/us-central1 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Multi-Zone' --replica-id 'cluster-mz-0' --instance-name 'test-cluster-mz-enterprise-failover' --instance-description 'test-cluster-mz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution --custom-network=gcp-network-${{ github.run_id }}"
# - name: PRO/ClusterSingleZone - GCP/us-central1 - Add/Remove Shards
# if: "true"
# testFile: test_cluster_shards.py
# tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
# cloudProvider: gcp
# cloudRegion: us-central1
# subscriptionId: sub-GJPV3NoNC0
# serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
# environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
# extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-sz-shards' --instance-description 'test-cluster-sz-shards' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1'"
# - name: PRO/ClusterMultiZone - GCP/us-central1 - Add/Remove Shards
# if: "true"
# testFile: test_cluster_shards.py
# tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
# cloudProvider: gcp
# cloudRegion: us-central1
# subscriptionId: sub-GJPV3NoNC0
# serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
# environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
# extraParams: "--resource-key 'cluster-Multi-Zone' --instance-name 'test-cluster-mz-shards' --instance-description 'test-cluster-mz-shards' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution"
# - name: PRO/ClusterSingleZone - GCP/us-central1 - Add/Remove Replicas
# if: "true"
# testFile: test_cluster_replicas.py
# tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
# cloudProvider: gcp
# cloudRegion: us-central1
# subscriptionId: sub-GJPV3NoNC0
# serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
# environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
# extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-sz-replicas' --instance-description 'test-cluster-sz-replicas' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --shards '3'"
# - name: PRO/ClusterMultiZone - GCP/us-central1 - Add/Remove Replicas
# if: "true"
# testFile: test_cluster_replicas.py
# tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
# cloudProvider: gcp
# cloudRegion: us-central1
# subscriptionId: sub-GJPV3NoNC0
# serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
# environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
# extraParams: "--resource-key 'cluster-Multi-Zone' --instance-name 'test-cluster-mz-replicas' --instance-description 'test-cluster-mz-replicas' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --shards '3' --ensure-mz-distribution"
- name: PRO/SingleZone - GCP/us-central1 - Test add/remove replica
if: "true"
testFile: test_replication_replicas.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --replica-id 'node-sz-0' --instance-name 'test-sz-add-remove-replica' --instance-description 'test-replication-add-remove' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/MultiZone - GCP/us-central1 - Test add/remove replica
if: "true"
testFile: test_replication_replicas.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: gcp
cloudRegion: us-central1
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --replica-id 'node-mz-0' --instance-name 'test-mz-add-remove-replica' --instance-description 'test-replication-add-remove' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
###################### AWS ######################
- name: Free - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: free-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT }}
extraParams: "--resource-key 'free' --replica-id 'node-f-0' --instance-name 'test-free-failover' --instance-description 'test-free-failover' --instance-type 'none' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/Standalone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --replica-id 'node-s-1' --instance-name 'test-standalone-failover' --instance-description 'test-standalone-failover' --instance-type 't2.medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/SingleZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-sz-failover' --instance-description 'test-sz-failover' --instance-type 't2.medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/MultiZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --instance-name 'test-mz-failover' --instance-description 'test-mz-failover' --instance-type 't2.medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always'"
- name: PRO/ClusterSingleZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --replica-id 'cluster-sz-1' --instance-name 'test-cluster-sz-failover' --instance-description 'test-cluster-sz-failover' --instance-type 't2.medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1'"
- name: PRO/ClusterMultiZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: pro-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Multi-Zone' --replica-id 'cluster-mz-1' --instance-name 'test-cluster-mz-failover' --instance-description 'test-cluster-mz-failover' --instance-type 't2.medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution"
# Enterprise
- name: Enterprise/Standalone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_standalone.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'standalone' --replica-id 'node-s-0' --instance-name 'test-standalone-enterprise-failover' --instance-description 'test-standalone-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=aws-network-${{ github.run_id }}"
- name: Enterprise/SingleZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'single-Zone' --instance-name 'test-sz-enterprise-failover' --instance-description 'test-sz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=aws-network-${{ github.run_id }}"
- name: Enterprise/MultiZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_replication.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'multi-Zone' --instance-name 'test-mz-enterprise-failover' --instance-description 'test-mz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --custom-network=aws-network-${{ github.run_id }}"
- name: Enterprise/ClusterSingleZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Single-Zone' --replica-id 'cluster-sz-0' --instance-name 'test-cluster-sz-enterprise-failover' --instance-description 'test-cluster-sz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --custom-network=aws-network-${{ github.run_id }}"
- name: Enterprise/ClusterMultiZone - AWS/us-east-2 - Failover & Persistence
if: "true"
testFile: test_cluster.py
tierName: enterprise-${{ contains(github.ref, 'refs/tags/v') && 'main' || github.ref_name }}
cloudProvider: aws
cloudRegion: us-east-2
subscriptionId: sub-GJPV3NoNC0
serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }}
environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}}
extraParams: "--resource-key 'cluster-Multi-Zone' --replica-id 'cluster-mz-0' --instance-name 'test-cluster-mz-enterprise-failover' --instance-description 'test-cluster-mz-enterprise-failover' --instance-type 'e2-medium' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --host-count '6' --cluster-replicas '1' --ensure-mz-distribution --custom-network=aws-network-${{ github.run_id }}"
steps:
- name: Checkout
if: matrix.instances.if == 'true' || matrix.instances.if == true
uses: actions/checkout@v3
- name: Setup python
if: matrix.instances.if == 'true' || matrix.instances.if == true
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Cache Poetry virtualenv
if: matrix.instances.if == 'true' || matrix.instances.if == true
id: cache
uses: actions/cache@v4
with:
path: ~/.poetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Poetry
if: steps.cache.outputs.cache-hit != true && (matrix.instances.if == 'true' || matrix.instances.if == true)
env:
if: ${{ matrix.instances.if }}
if_equal_bool: ${{ matrix.instances.if == true }}
if_equal_str: ${{ matrix.instances.if == 'true' }}
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
if: matrix.instances.if == 'true' || matrix.instances.if == true
run: poetry install
- name: ${{ matrix.instances.name }}
if: matrix.instances.if == 'true' || matrix.instances.if == true
env:
SERVICE_ID: ${{ matrix.instances.serviceId }}
ENVIRONMENT_ID: ${{ matrix.instances.environmentId }}
CLOUD_PROVIDER: ${{ matrix.instances.cloudProvider }}
CLOUD_REGION: ${{ matrix.instances.cloudRegion }}
extraParams: ${{ matrix.instances.extraParams }}
SUBSCRIPTION_ID: ${{ matrix.instances.subscriptionId }}
REF_NAME: ${{ matrix.instances.tierName }}
run: |
poetry run python -u ./omnistrate_tests/${{ matrix.instances.testFile }} ${{ secrets.OMNISTRATE_USERNAME }} ${{ secrets.OMNISTRATE_PASSWORD }} ${{ env.CLOUD_PROVIDER }} ${{ env.CLOUD_REGION }} --service-id ${{ env.SERVICE_ID }} --environment-id ${{ env.ENVIRONMENT_ID }} ${{ env.extraParams }}
delete-networks:
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Delete Omnistrate Custom Network - GCP
uses: ./.github/actions/delete-omnistrate-custom-network
continue-on-error: true
with:
username: ${{ secrets.OMNISTRATE_USERNAME }}
password: ${{ secrets.OMNISTRATE_PASSWORD }}
cloud_provider: gcp
region: us-central1
custom_network_name: ${{ env.GCP_NETWORK_NAME }}
- name: Delete Omnistrate Custom Network - AWS
continue-on-error: true
uses: ./.github/actions/delete-omnistrate-custom-network
with:
username: ${{ secrets.OMNISTRATE_USERNAME }}
password: ${{ secrets.OMNISTRATE_PASSWORD }}
cloud_provider: aws
region: us-east-2
custom_network: ${{ env.AWS_NETWORK_NAME }}