Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 19 additions & 9 deletions .github/workflows/PMM_PS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ on:
workflow_dispatch:
inputs:
ps_version:
description: "ps version example: 8.0.34-26 , Fetched from https://github.com/Percona-QA/package-testing/blob/master/VERSIONS"
default: 'https://github.com/Percona-QA/package-testing/blob/master/VERSIONS'
description: "PS Version ex: 5.7/8.0/8.4, Minor versions from https://github.com/Percona-QA/package-testing/blob/master/VERSIONS"
default: '8.4'
required: true
ps_glibc:
description: "ps glibc version, example: 2.35"
description: "PS Glibc version, example: 2.35"
default: '2.35'
required: false
pmm_qa_branch:
Expand All @@ -19,11 +19,11 @@ on:
required: false
type: string
pmm_server_image:
description: "pmm_image, example: perconalab/pmm-server:3-dev-latest"
description: "PMM Server image, example: perconalab/pmm-server:3-dev-latest"
default: 'perconalab/pmm-server:3-dev-latest'
required: false
pmm_client_version:
description: 'PMM Client version (3-dev-latest|pmm3-rc|x.xx.x|https...)'
description: 'PMM Client version (3-dev-latest|pmm3-rc|3.xx.x|https...)'
default: '3-dev-latest'
required: false
type: string
Expand All @@ -41,7 +41,7 @@ jobs:
timeout-minutes: 40
env:
ADMIN_PASSWORD: 'admin'
PS_VERSION: ${{ github.event.inputs.ps_version || '8.0' }}
PS_VERSION: ${{ github.event.inputs.ps_version || '8.4' }}
PS_GLIBC: ${{ github.event.inputs.ps_glibc || '2.35' }}
PMM_SERVER_IMAGE: ${{ github.event.inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }}
PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'v3' }}
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
working-directory: qa-integration
run: echo "PATH_TO_PMM_QA=$(pwd)" >> $GITHUB_ENV

- name: Run Setup for E2E Tests
- name: Run Setup for PS E2E Tests
working-directory: qa-integration/pmm_qa
run: |
mkdir -m 777 -p /tmp/backup_data
Expand All @@ -107,6 +107,16 @@ jobs:
python pmm-framework.py --verbose --pmm-server-password=${{ env.ADMIN_PASSWORD }} --client-version=${{ env.PMM_CLIENT_VERSION }} --database PS,TARBALL=${{ env.PS_TARBALL_PATH }}
fi

- name: Run Setup for PS Replica E2E Tests
working-directory: qa-integration/pmm_qa
run: |
. virtenv/bin/activate
if [[ "${{ github.event.inputs.ps_version }}" != http* ]]; then
python pmm-framework.py --verbose --pmm-server-password=${{ env.ADMIN_PASSWORD }} --client-version=${{ env.PMM_CLIENT_VERSION }} --database PS=${{ env.PS_VERSION }},SETUP_TYPE=replica
else
python pmm-framework.py --verbose --pmm-server-password=${{ env.ADMIN_PASSWORD }} --client-version=${{ env.PMM_CLIENT_VERSION }} --database PS,TARBALL=${{ env.PS_TARBALL_PATH }},SETUP_TYPE=replica
fi

- name: Checkout PMM UI tests
uses: actions/checkout@v4
with:
Expand All @@ -118,8 +128,8 @@ jobs:
run: npm ci && npx playwright install --with-deps && npx codeceptjs def pr.codecept.js
working-directory: pmm-ui-tests

- name: Run the Integration tests of PS
- name: Run the Integration tests of PS and PS Replica
run: |
export PMM_UI_URL="http://127.0.0.1:8081/"
npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_ps_integration_test.js
npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_ps_integration_test.js tests/qa-integration/pmm_ps_replica_integration_test.js
working-directory: pmm-ui-tests
3 changes: 2 additions & 1 deletion pmm_qa/pmm-framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def setup_ps(db_type, db_version=None, db_config=None, args=None):
'PS_NODES': no_of_nodes,
'PS_VERSION': ps_version,
'PMM_SERVER_IP': args.pmm_server_ip or container_name or '127.0.0.1',
'PS_CONTAINER': 'ps_pmm_' + str(ps_version),
'PS_CONTAINER': 'ps_pmm_' + str(ps_version) + ('_replica' if setup_type_value in ("replication", "replica") else ''),
'PS_PORT': 3318 if setup_type_value in ("replication", "replica") else 3317,
'CLIENT_VERSION': get_value('CLIENT_VERSION', db_type, args, db_config),
'QUERY_SOURCE': get_value('QUERY_SOURCE', db_type, args, db_config),
'PS_TARBALL': get_value('TARBALL', db_type, args, db_config),
Expand Down
5 changes: 3 additions & 2 deletions pmm_qa/ps_pmm_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
admin_password: "{{ lookup('vars', 'extra_admin_password', default=lookup('env','ADMIN_PASSWORD') | default('admin', true) ) }}"
pmm_qa_branch: "{{ lookup('vars', 'extra_pmm_qa_branch', default=lookup('env','PMM_QA_GIT_BRANCH') | default('main', true) ) }}"
number_of_nodes: "{{ lookup('vars', 'extra_number_of_nodes', default=lookup('env','PS_NODES') | default('3', true) ) }}"
ps_port: "{{ lookup('vars', 'extra_number_of_nodes', default=lookup('env','PS_PORT') | default('3317', true) ) }}"
group_replication: "{{ lookup('vars', 'extra_group_replication', default=lookup('env','GROUP_REPLICATION') | default('', true) ) }}"

tasks:
Expand All @@ -32,7 +33,7 @@
- name: Prepare Container for ps and Proxysql
shell: >
docker run -d --name={{ ps_container }}
-p 3317:3307
-p {{ ps_port }}:3307
phusion/baseimage:jammy-1.0.1

- name: Copy all required Artifacts to the docker ps_container
Expand Down Expand Up @@ -68,5 +69,5 @@
- name: Execute Setup script inside the ps ps_container
shell: "{{ item }}"
with_items:
- docker exec {{ ps_container }} bash -xe ./client_container_ps_setup.sh --ps_version {{ ps_version }} --ps_tarball {{ ps_tarball }} --number_of_nodes {{ number_of_nodes }} --query_source {{ query_source }} --group_replication {{ group_replication }} > setup_ps_{{ ps_version }}.log
- docker exec {{ ps_container }} bash -xe ./client_container_ps_setup.sh --ps_version {{ ps_version }} --ps_tarball {{ ps_tarball }} --number_of_nodes {{ number_of_nodes }} --query_source {{ query_source }} --group_replication {{ group_replication }} > setup_ps_{{ ps_container }}.log

Loading