From fff20703af0586308594968304838b4fbaaa94f0 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 02:36:50 +0200 Subject: [PATCH 01/13] PMM-12359 initial pipleine --- .github/workflows/ui-tests-podman.yml | 237 ++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 .github/workflows/ui-tests-podman.yml diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml new file mode 100644 index 000000000000..2a5e30d6ae5c --- /dev/null +++ b/.github/workflows/ui-tests-podman.yml @@ -0,0 +1,237 @@ +name: UI tests +on: + workflow_call: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + client_flags: + description: "example: --addclient=ps,1 --ps-version=5.7" + required: false + type: string + tags_for_tests: + description: "example: @settings-fb" + required: true + type: string + push: + branches: + - PMM-12359-podman-setup + +jobs: + ui-tests-e2e: +# runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed + runs-on: ubuntu-20.04 + timeout-minutes: 60 + env: + SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ADMIN_PASSWORD: 'admin-password' + PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} + PMM_QA_GIT_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} + PMM_UI_BRANCH: ${{ inputs.pmm_ui_branch || 'main' }} + DOCKER_VERSION: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + SHA: ${{ inputs.sha || 'null' }} + CLIENT_FLAGS: ${{ inputs.client_flags || '' }} + TAGS_FOR_TESTS: ${{ inputs.tags_for_tests || '@settings-fb' }} + +# Environment variables for tests + BACKUP_LOCATION_ACCESS_KEY: ${{ secrets.BACKUP_LOCATION_ACCESS_KEY }} + BACKUP_LOCATION_SECRET_KEY: ${{ secrets.BACKUP_LOCATION_SECRET_KEY }} + + + steps: + - name: Create status check + if: ${{ github.event_name != 'pull_request' }} + uses: percona-platform/github-status-action@v1 + continue-on-error: true + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ env.TAGS_FOR_TESTS }} UI tests" + description: "Test execution ${{ job.status }}" + state: "pending" + repository: ${{ github.repository }} + target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + sha: ${{ env.SHA }} + + - name: "Checkout PMM UI tests: ${{ env.PMM_UI_BRANCH }}" + uses: actions/checkout@v3 + with: + ref: ${{ env.PMM_UI_BRANCH }} + repository: percona/pmm-ui-tests + path: ./pmm-ui-tests + + - name: "Checkout PMM QA: ${{ env.PMM_QA_BRANCH }}" + uses: actions/checkout@v3 + with: + ref: ${{ env.PMM_QA_BRANCH }} + repository: percona/pmm-qa + path: ./pmm-qa + + - name: Setup tools + run: | + npm install -g bats + sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible libaio1 libaio-dev libnuma-dev libncurses5 socat sysbench + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 + echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ + /etc/apt/sources.list.d/clickhouse.list + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee \ + /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list + curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add - + sudo apt-get update + sudo apt-get -y upgrade + sudo apt-get install -y + sudo apt-get install -y clickhouse-client podman + sudo curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash + ls -la + pushd ./pmm-qa + wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh + chmod +x get_download_link.sh + popd + sudo sysctl net.ipv4.ip_unprivileged_port_start=80 + + - name: Setup PMM2-Server + working-directory: ./pmm-ui-tests + run: | + mkdir -p ~/.config/systemd/user/ + sudo -u $real_user cat > ~/.config/systemd/user/pmm-server.service < ~/.config/pmm-server/pmm-server.env <> $GITHUB_ENV + + - name: Setup PMM2-Client + working-directory: ./pmm-qa + run: sudo bash -x pmm-tests/pmm2-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no + + - name: Run Setup for E2E Tests + working-directory: ./pmm-qa + run: sudo -E bash -x pmm-tests/pmm-framework.sh ${{ env.CLIENT_FLAGS }} --pmm2 + + - name: Setup npm modules for e2e tests + working-directory: ./pmm-ui-tests + run: | + npm ci + envsubst < env.list > env.generated.list + + - name: Execute e2e tests with tags ${{ env.TAGS_FOR_TESTS }} + working-directory: ./pmm-ui-tests + env: + SERVER_IP : "192.168.0.1" + PMM_UI_URL : "http://192.168.0.1/" + PMM_URL : "http://admin:${{ env.ADMIN_PASSWORD }}@${{ env.SERVER_IP }}" + run: | + sed -i 's+http://localhost/+${PMM_UI_URL}/+g' pr.codecept.js + ./node_modules/.bin/codeceptjs run -c pr.codecept.js --grep "${{ env.TAGS_FOR_TESTS }}" + + - uses: actions/github-script@v6 + if: ${{ always() }} + id: artifact_name + with: + script: | + return `artifacts_for_${process.env.TAGS_FOR_TESTS.replaceAll('|', '')}` + result-encoding: string + + - name: Create status check + if: ${{ github.event_name != 'pull_request' && always() }} + uses: percona-platform/github-status-action@v1 + continue-on-error: true + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ env.TAGS_FOR_TESTS }} UI tests" + description: "Test execution ${{ job.status }}" + state: ${{ job.status }} + repository: ${{ github.repository }} + target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + sha: ${{ env.SHA }} + +# - name: Setup tmate session on failure +# if: ${{ failure() }} +# uses: percona-platform/action-tmate@v2 From 80e5de350fcc949e9a5f285e235930ceca3e068e Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 02:38:42 +0200 Subject: [PATCH 02/13] PMM-12359 initial pipleine --- .github/workflows/ui-tests-podman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 2a5e30d6ae5c..a97a03b3c72c 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -1,4 +1,4 @@ -name: UI tests +name: UI tests (podman) on: workflow_call: inputs: From 4f33f9a93648ef3b6f91c61d5020ad84d2d6f333 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 02:42:14 +0200 Subject: [PATCH 03/13] PMM-12359 added missed command --- .github/workflows/ui-tests-podman.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index a97a03b3c72c..53e7a5d81719 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -98,6 +98,7 @@ jobs: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ /etc/apt/sources.list.d/clickhouse.list + . /etc/os-release echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee \ /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add - From 354e25a4e71a93dcba48418506556b881821475d Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 02:47:25 +0200 Subject: [PATCH 04/13] PMM-12359 fixed syntax --- .github/workflows/ui-tests-podman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 53e7a5d81719..e88d55d60a37 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -118,7 +118,7 @@ jobs: working-directory: ./pmm-ui-tests run: | mkdir -p ~/.config/systemd/user/ - sudo -u $real_user cat > ~/.config/systemd/user/pmm-server.service < ~/.config/systemd/user/pmm-server.service < Date: Mon, 31 Jul 2023 02:51:25 +0200 Subject: [PATCH 05/13] PMM-12359 fixed syntax --- .github/workflows/ui-tests-podman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index e88d55d60a37..f89e95c9018f 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -181,7 +181,7 @@ jobs: sleep 10 done; timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:admin@127.0.0.1/ping)" != "200" ]]; do sleep 5; done' || false - podman exec -t pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }} + podman exec pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }} bash -x testdata/db_setup.sh - name: Export path to pmm-qa repo From 7613b5335d7608b107113b87b32268d1deb187cc Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 11:47:30 +0200 Subject: [PATCH 06/13] PMM-12359 fixed syntax --- .github/workflows/ui-tests-podman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index f89e95c9018f..3d1b3a030c89 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -165,7 +165,7 @@ jobs: EOF - systemctl enable --now pmm-server + systemctl --user enable --now pmm-server export CONTAINER_NAME="pmm-server" export LOGS="pmm-managed entered RUNNING state" From 4a31f6a82b3208e803d0a036aa1787368c8b3303 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 14:52:46 +0200 Subject: [PATCH 07/13] PMM-12359 removed setup --- .github/workflows/ui-tests-podman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 3d1b3a030c89..306b3a19b345 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -182,7 +182,7 @@ jobs: done; timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:admin@127.0.0.1/ping)" != "200" ]]; do sleep 5; done' || false podman exec pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }} - bash -x testdata/db_setup.sh + # bash -x testdata/db_setup.sh - name: Export path to pmm-qa repo working-directory: ./pmm-qa From 29122d12e32a2a15fb4ae43311243d2410ae5cfa Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 20:08:22 +0200 Subject: [PATCH 08/13] PMM-12359 fixed server IP --- .github/workflows/ui-tests-podman.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 306b3a19b345..28874fe3de9c 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -190,7 +190,7 @@ jobs: - name: Setup PMM2-Client working-directory: ./pmm-qa - run: sudo bash -x pmm-tests/pmm2-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no + run: sudo bash -x pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no - name: Run Setup for E2E Tests working-directory: ./pmm-qa @@ -205,8 +205,8 @@ jobs: - name: Execute e2e tests with tags ${{ env.TAGS_FOR_TESTS }} working-directory: ./pmm-ui-tests env: - SERVER_IP : "192.168.0.1" - PMM_UI_URL : "http://192.168.0.1/" + SERVER_IP : "127.0.0.1" + PMM_UI_URL : "http://127.0.0.1/" PMM_URL : "http://admin:${{ env.ADMIN_PASSWORD }}@${{ env.SERVER_IP }}" run: | sed -i 's+http://localhost/+${PMM_UI_URL}/+g' pr.codecept.js From 93d11061139b2c35ba1f918e8ecb7491410339fa Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 31 Jul 2023 20:42:33 +0200 Subject: [PATCH 09/13] PMM-12359 added test full FB on podman --- .github/workflows/pmm2-ui-tests-fb-podman.yml | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 .github/workflows/pmm2-ui-tests-fb-podman.yml diff --git a/.github/workflows/pmm2-ui-tests-fb-podman.yml b/.github/workflows/pmm2-ui-tests-fb-podman.yml new file mode 100644 index 000000000000..11405ce42ae3 --- /dev/null +++ b/.github/workflows/pmm2-ui-tests-fb-podman.yml @@ -0,0 +1,193 @@ +name: pmm2-ui-tests-fb podman +on: + push: + branches: + - PMM-12359-podman-setup + + workflow_dispatch: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + + workflow_call: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball URL or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + + secrets: + BACKUP_LOCATION_ACCESS_KEY: + required: false + BACKUP_LOCATION_SECRET_KEY: + required: false + + +jobs: + + backup_management_mongo: + name: Backup Management MongoDB UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--mongo-replica-for-backup' + tags_for_tests: '@bm-mongo' + +# -- include backup_management_ps once setup for mysql fixed for the worker +# backup_management_ps: +# name: Backup Management PS UI tests +# uses: ./.github/workflows/ui-tests-podman.yml +# secrets: inherit +# with: +# server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} +# client_version: ${{ inputs.client_version || 'dev-latest' }} +# client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} +# pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} +# pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} +# sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} +# client_flags: '--mongo-replica-for-backup --setup-bm-mysql' +# tags_for_tests: '@bm-mysql' + + backup_management_common: + name: Backup Management Common and Locations UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--mongo-replica-for-backup --setup-bm-mysql' + # tags_for_tests: '@bm-common|@bm-locations' -- include bm-common once setup for mysql fixed + tags_for_tests: '@bm-locations' + + instances: + name: Instances UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--addclient=haproxy,1 --addclient=ps,1 --setup-external-service' + tags_for_tests: '@instances-fb' + + alerting_and_settings: + name: Alerting and Settings UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + tags_for_tests: '@alerting-fb|@settings-fb' + + user_and_password: + name: User with changed password UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1' + tags_for_tests: '@user-password' + + pgsm: + name: PGSM UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--setup-pmm-pgsm-integration' + tags_for_tests: '@pgsm-pmm-integration' + + pgss: + name: PGSS UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--setup-pmm-pgss-integration' + tags_for_tests: '@pgss-pmm-integration' + + rbac: + name: RBAC UI tests + uses: percona/pmm-ui-tests/.github/workflows/pmm-ui-tests.yml@main + secrets: inherit + with: + pmm_ui_tests_branch: ${{ inputs.pmm_ui_branch || 'main '}} + pmm_test_flag: '@rbac' + pmm_server_version: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + pmm_client_version: ${{ inputs.client_version || 'dev-latest' }} + pmm_clients: '--addclient=ps,1' + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} From a8d1fe2bca158122c9ef4e6f60f1a07eea25288a Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 1 Aug 2023 18:32:01 +0200 Subject: [PATCH 10/13] PMM-12359 added podman tests to FB --- .github/workflows/pmm2-ui-tests-fb-podman.yml | 193 ------------------ .github/workflows/pmm2-ui-tests-fb.yml | 14 ++ .github/workflows/ui-tests-podman.yml | 3 +- .github/workflows/ui-tests.yml | 3 +- 4 files changed, 18 insertions(+), 195 deletions(-) delete mode 100644 .github/workflows/pmm2-ui-tests-fb-podman.yml diff --git a/.github/workflows/pmm2-ui-tests-fb-podman.yml b/.github/workflows/pmm2-ui-tests-fb-podman.yml deleted file mode 100644 index 11405ce42ae3..000000000000 --- a/.github/workflows/pmm2-ui-tests-fb-podman.yml +++ /dev/null @@ -1,193 +0,0 @@ -name: pmm2-ui-tests-fb podman -on: - push: - branches: - - PMM-12359-podman-setup - - workflow_dispatch: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" - required: false - type: string - client_version: - description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" - required: false - type: string - client_image: - description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" - required: false - type: string - pmm_qa_branch: - description: "Branch for PMM-QA to checkout" - required: false - type: string - pmm_ui_branch: - description: "Branch for PMM-UI tests to checkout" - required: false - type: string - sha: - description: "SHA (leave empty if running manually, default - 'null')" - required: false - type: string - - workflow_call: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" - required: false - type: string - client_version: - description: "pmm2-client version Tarball URL or Dev-latest, default is dev-latest" - required: false - type: string - client_image: - description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" - required: false - type: string - pmm_qa_branch: - description: "Branch for PMM-QA to checkout" - required: false - type: string - pmm_ui_branch: - description: "Branch for PMM-UI tests to checkout" - required: false - type: string - sha: - description: "SHA (leave empty if running manually, default - 'null')" - required: false - type: string - - secrets: - BACKUP_LOCATION_ACCESS_KEY: - required: false - BACKUP_LOCATION_SECRET_KEY: - required: false - - -jobs: - - backup_management_mongo: - name: Backup Management MongoDB UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--mongo-replica-for-backup' - tags_for_tests: '@bm-mongo' - -# -- include backup_management_ps once setup for mysql fixed for the worker -# backup_management_ps: -# name: Backup Management PS UI tests -# uses: ./.github/workflows/ui-tests-podman.yml -# secrets: inherit -# with: -# server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} -# client_version: ${{ inputs.client_version || 'dev-latest' }} -# client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} -# pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} -# pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} -# sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} -# client_flags: '--mongo-replica-for-backup --setup-bm-mysql' -# tags_for_tests: '@bm-mysql' - - backup_management_common: - name: Backup Management Common and Locations UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--mongo-replica-for-backup --setup-bm-mysql' - # tags_for_tests: '@bm-common|@bm-locations' -- include bm-common once setup for mysql fixed - tags_for_tests: '@bm-locations' - - instances: - name: Instances UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--addclient=haproxy,1 --addclient=ps,1 --setup-external-service' - tags_for_tests: '@instances-fb' - - alerting_and_settings: - name: Alerting and Settings UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - tags_for_tests: '@alerting-fb|@settings-fb' - - user_and_password: - name: User with changed password UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1' - tags_for_tests: '@user-password' - - pgsm: - name: PGSM UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--setup-pmm-pgsm-integration' - tags_for_tests: '@pgsm-pmm-integration' - - pgss: - name: PGSS UI tests - uses: ./.github/workflows/ui-tests-podman.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - client_version: ${{ inputs.client_version || 'dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} - pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} - sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} - client_flags: '--setup-pmm-pgss-integration' - tags_for_tests: '@pgss-pmm-integration' - - rbac: - name: RBAC UI tests - uses: percona/pmm-ui-tests/.github/workflows/pmm-ui-tests.yml@main - secrets: inherit - with: - pmm_ui_tests_branch: ${{ inputs.pmm_ui_branch || 'main '}} - pmm_test_flag: '@rbac' - pmm_server_version: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - pmm_client_version: ${{ inputs.client_version || 'dev-latest' }} - pmm_clients: '--addclient=ps,1' - pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} diff --git a/.github/workflows/pmm2-ui-tests-fb.yml b/.github/workflows/pmm2-ui-tests-fb.yml index 3217c75c454b..ef5605fb716c 100644 --- a/.github/workflows/pmm2-ui-tests-fb.yml +++ b/.github/workflows/pmm2-ui-tests-fb.yml @@ -188,3 +188,17 @@ jobs: pmm_client_version: ${{ inputs.client_version || 'dev-latest' }} pmm_clients: '--addclient=ps,1' pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + + user_and_password_podman: + name: User with changed password UI tests + uses: ./.github/workflows/ui-tests-podman.yml + secrets: inherit + with: + server_image: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ inputs.client_version || 'dev-latest' }} + client_image: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1' + tags_for_tests: '@user-password' \ No newline at end of file diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 28874fe3de9c..8176c7c7bacb 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -1,4 +1,4 @@ -name: UI tests (podman) +name: ui-tests-podman-pipeline on: workflow_call: inputs: @@ -40,6 +40,7 @@ on: jobs: ui-tests-e2e: + name: "e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" # runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed runs-on: ubuntu-20.04 timeout-minutes: 60 diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index aad1911daad4..4ef9d32f4258 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -1,4 +1,4 @@ -name: UI tests +name: ui-tests-pipeline on: workflow_call: inputs: @@ -37,6 +37,7 @@ on: jobs: ui-tests-e2e: + name: "e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" # runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed runs-on: ubuntu-20.04 timeout-minutes: 60 From 3a7b962ae6a32a2e4c888612c9861067dacf0eb4 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 1 Aug 2023 18:36:44 +0200 Subject: [PATCH 11/13] PMM-12359 adjusted names --- .github/workflows/pmm2-ui-tests-fb.yml | 2 +- .github/workflows/ui-tests-podman.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pmm2-ui-tests-fb.yml b/.github/workflows/pmm2-ui-tests-fb.yml index ef5605fb716c..d06a4aec0882 100644 --- a/.github/workflows/pmm2-ui-tests-fb.yml +++ b/.github/workflows/pmm2-ui-tests-fb.yml @@ -1,4 +1,4 @@ -name: pmm2-ui-tests-fb pipeline +name: pmm2-ui-tests-fb on: workflow_dispatch: diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml index 8176c7c7bacb..915e38162749 100644 --- a/.github/workflows/ui-tests-podman.yml +++ b/.github/workflows/ui-tests-podman.yml @@ -40,7 +40,7 @@ on: jobs: ui-tests-e2e: - name: "e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" + name: "podman e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" # runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed runs-on: ubuntu-20.04 timeout-minutes: 60 From efa959c573d75f7a46b1d25cc5fc20e13a32457c Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 2 Aug 2023 12:06:14 +0200 Subject: [PATCH 12/13] PMM-12359 markup refactoring --- .github/workflows/pmm2-ui-tests-fb.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pmm2-ui-tests-fb.yml b/.github/workflows/pmm2-ui-tests-fb.yml index 297642a3c474..b9136ea714b0 100644 --- a/.github/workflows/pmm2-ui-tests-fb.yml +++ b/.github/workflows/pmm2-ui-tests-fb.yml @@ -1,6 +1,6 @@ name: pmm2-ui-tests-fb -on: +on: workflow_dispatch: inputs: server_image: @@ -61,9 +61,7 @@ on: BACKUP_LOCATION_SECRET_KEY: required: false - jobs: - backup_management_mongo: name: Backup Management MongoDB UI tests uses: ./.github/workflows/ui-tests.yml From ae0e26ba97271a5e0062f99294f82bb683edf5b9 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 2 Aug 2023 12:12:10 +0200 Subject: [PATCH 13/13] PMM-12359 fixed missing empty line at the file end --- .github/workflows/pmm2-ui-tests-fb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm2-ui-tests-fb.yml b/.github/workflows/pmm2-ui-tests-fb.yml index b9136ea714b0..1e3888b883b4 100644 --- a/.github/workflows/pmm2-ui-tests-fb.yml +++ b/.github/workflows/pmm2-ui-tests-fb.yml @@ -213,4 +213,4 @@ jobs: pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }} sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1' - tags_for_tests: '@user-password' \ No newline at end of file + tags_for_tests: '@user-password'