From 3bf2b37646cc12946be5b3d42dd441f7d0ac29b6 Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Mon, 25 Nov 2024 13:43:52 +0300 Subject: [PATCH 1/2] fix: investigate 1 minute query timeout --- .github/workflows/quality.yml | 45 ++++++++++++++++++++++++++++++----- src/services/api.ts | 2 +- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 770bf38a1..3f49d2159 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -8,10 +8,14 @@ on: jobs: e2e_tests: - name: Playwright Tests + name: Playwright Tests (${{ matrix.shard }}) runs-on: ubuntu-latest permissions: contents: read + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3, 4] services: backend: @@ -40,7 +44,7 @@ jobs: - name: Run Playwright tests id: run_tests - run: npm run test:e2e + run: npx playwright test --shard ${{ matrix.shard }}/4 env: CI: true PLAYWRIGHT_VIDEO: 'on' @@ -49,7 +53,7 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: playwright-artifacts + name: playwright-artifacts-${{ matrix.shard }} path: playwright-artifacts retention-days: 5 @@ -90,6 +94,35 @@ jobs: echo "flaky=$flaky" >> $GITHUB_OUTPUT echo "skipped=$skipped" >> $GITHUB_OUTPUT + merge_reports: + name: Merge Test Reports + if: always() + needs: [e2e_tests] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download all artifacts + uses: actions/download-artifact@v3 + with: + path: all-artifacts + + - name: Merge reports + run: | + mkdir -p merged-artifacts/playwright-report + # Merge HTML reports (just copy the last one as they can't be properly merged) + cp -r all-artifacts/playwright-artifacts-*/playwright-report/* merged-artifacts/playwright-report/ + + # Create directory for merged results + mkdir -p merged-artifacts + + - name: Upload merged artifacts + uses: actions/upload-artifact@v3 + with: + name: playwright-artifacts + path: merged-artifacts + retention-days: 5 + bundle_size: name: Check Bundle Size runs-on: ubuntu-latest @@ -155,7 +188,7 @@ jobs: deploy_report: name: Deploy Test Report - needs: [e2e_tests] + needs: [merge_reports] if: always() && (github.event_name == 'push' && github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) runs-on: ubuntu-latest permissions: @@ -173,7 +206,7 @@ jobs: mkdir gh-pages git --work-tree=gh-pages checkout gh-pages -- . - - name: Download Playwright artifacts + - name: Download merged artifacts uses: actions/download-artifact@v3 with: name: playwright-artifacts @@ -215,7 +248,7 @@ jobs: with: fetch-depth: 0 - - name: Download Playwright artifacts + - name: Download merged artifacts uses: actions/download-artifact@v3 with: name: playwright-artifacts diff --git a/src/services/api.ts b/src/services/api.ts index 06b5229be..440db8f96 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -564,7 +564,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper { return this.post | ErrorResponse | null>( this.getPath('/viewer/json/query'), {...params, base64}, - {schema: 'multi', base64}, + {schema: 'multi', base64, timeout: params.timeout}, { concurrentId, timeout: params.timeout, From 40523a4749b7bc7dd8e6197896e71520c7a5182c Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Mon, 25 Nov 2024 13:53:45 +0300 Subject: [PATCH 2/2] fix: return to one shard --- .github/workflows/quality.yml | 45 +++++------------------------------ 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 3f49d2159..770bf38a1 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -8,14 +8,10 @@ on: jobs: e2e_tests: - name: Playwright Tests (${{ matrix.shard }}) + name: Playwright Tests runs-on: ubuntu-latest permissions: contents: read - strategy: - fail-fast: false - matrix: - shard: [1, 2, 3, 4] services: backend: @@ -44,7 +40,7 @@ jobs: - name: Run Playwright tests id: run_tests - run: npx playwright test --shard ${{ matrix.shard }}/4 + run: npm run test:e2e env: CI: true PLAYWRIGHT_VIDEO: 'on' @@ -53,7 +49,7 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: playwright-artifacts-${{ matrix.shard }} + name: playwright-artifacts path: playwright-artifacts retention-days: 5 @@ -94,35 +90,6 @@ jobs: echo "flaky=$flaky" >> $GITHUB_OUTPUT echo "skipped=$skipped" >> $GITHUB_OUTPUT - merge_reports: - name: Merge Test Reports - if: always() - needs: [e2e_tests] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Download all artifacts - uses: actions/download-artifact@v3 - with: - path: all-artifacts - - - name: Merge reports - run: | - mkdir -p merged-artifacts/playwright-report - # Merge HTML reports (just copy the last one as they can't be properly merged) - cp -r all-artifacts/playwright-artifacts-*/playwright-report/* merged-artifacts/playwright-report/ - - # Create directory for merged results - mkdir -p merged-artifacts - - - name: Upload merged artifacts - uses: actions/upload-artifact@v3 - with: - name: playwright-artifacts - path: merged-artifacts - retention-days: 5 - bundle_size: name: Check Bundle Size runs-on: ubuntu-latest @@ -188,7 +155,7 @@ jobs: deploy_report: name: Deploy Test Report - needs: [merge_reports] + needs: [e2e_tests] if: always() && (github.event_name == 'push' && github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) runs-on: ubuntu-latest permissions: @@ -206,7 +173,7 @@ jobs: mkdir gh-pages git --work-tree=gh-pages checkout gh-pages -- . - - name: Download merged artifacts + - name: Download Playwright artifacts uses: actions/download-artifact@v3 with: name: playwright-artifacts @@ -248,7 +215,7 @@ jobs: with: fetch-depth: 0 - - name: Download merged artifacts + - name: Download Playwright artifacts uses: actions/download-artifact@v3 with: name: playwright-artifacts