The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
ci: allow running stress tests on sdk tests (#64759)
Nicolò Pretto1e997d6d5c93
diff --git a/.github/workflows/e2e-stress-test-flake-fix.yml b/.github/workflows/e2e-stress-test-flake-fix.ymlindex 4a064364055..22cc91407f2 100644--- a/.github/workflows/e2e-stress-test-flake-fix.yml+++ b/.github/workflows/e2e-stress-test-flake-fix.yml@@ -37,8 +37,26 @@ on:default: truejobs:+ determine-suite:+ name: Determine test suite+ runs-on: ubuntu-22.04+ timeout-minutes: 5+ outputs:+ suite: ${{ steps.detect.outputs.suite }}+ steps:+ - name: Detect suite from spec path+ id: detect+ run: |+ SPEC='${{ inputs.spec }}'+ if [[ "$SPEC" == e2e/test-component/scenarios/embedding-sdk/* ]]; then+ echo "suite=component" >> $GITHUB_OUTPUT+ else+ echo "suite=e2e" >> $GITHUB_OUTPUT+ fi+workflow-summary:name: Stress test inputs+ needs: [determine-suite]runs-on: ubuntu-22.04timeout-minutes: 5steps:@@ -48,6 +66,7 @@ jobs:echo '' >> $GITHUB_STEP_SUMMARYecho '- `branch`: ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARYecho '- `spec`: ${{ inputs.spec }}' >> $GITHUB_STEP_SUMMARY+ echo '- `test_suite` (inferred): ${{ needs.determine-suite.outputs.suite }}' >> $GITHUB_STEP_SUMMARYecho '- `burn_in`: ${{ inputs.burn_in }}' >> $GITHUB_STEP_SUMMARYecho '- `grep`: "${{ inputs.grep }}"' >> $GITHUB_STEP_SUMMARYecho '- `qa_db`: "${{ inputs.qa_db }}"' >> $GITHUB_STEP_SUMMARY@@ -56,6 +75,7 @@ jobs:echo 'triggered by: @${{ github.event.sender.login }}' >> $GITHUB_STEP_SUMMARYstress-test-flake-fix:+ needs: [determine-suite]runs-on: ubuntu-22.04timeout-minutes: 60name: Stress test E2E flake fix@@ -100,6 +120,16 @@ jobs:- name: Prepare front-end environmentuses: ./.github/actions/prepare-frontend++ - name: Prepare back-end environment+ if: ${{ needs.determine-suite.outputs.suite == 'component' }}+ uses: ./.github/actions/prepare-backend+ with:+ m2-cache-key: "cljs"+ - name: Build Embedding SDK package+ if: ${{ needs.determine-suite.outputs.suite == 'component' }}+ run: yarn build-embedding-sdk-package+- name: Prepare JDK 21uses: actions/setup-java@v4with:@@ -118,8 +148,9 @@ jobs:- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} timesenv:GREP: ${{ github.event.inputs.grep }}+ CYPRESS_IS_EMBEDDING_SDK: ${{ needs.determine-suite.outputs.suite == 'component' }}run: |- node e2e/runner/run_cypress_ci.js e2e \+ node e2e/runner/run_cypress_ci.js ${{ needs.determine-suite.outputs.suite }} \--spec '${{ github.event.inputs.spec }}' \--env burn=${{ github.event.inputs.burn_in }} \--config-file e2e/support/cypress-stress-test.config.js \diff --git a/e2e/support/cypress-stress-test.config.js b/e2e/support/cypress-stress-test.config.jsindex 6a15e221828..c066dc7d637 100644--- a/e2e/support/cypress-stress-test.config.js+++ b/e2e/support/cypress-stress-test.config.js@@ -1,5 +1,11 @@const { defineConfig } = require("cypress");-const { stressTestConfig } = require("./config");+const {+ stressTestConfig,+ embeddingSdkComponentTestConfig,+} = require("./config");-module.exports = defineConfig({ e2e: stressTestConfig });+module.exports = defineConfig({+ e2e: stressTestConfig,+ component: { ...embeddingSdkComponentTestConfig, retries: 0 },+});diff --git a/e2e/support/helpers/embedding-sdk-component-testing/component-embedding-sdk-helpers.tsx b/e2e/support/helpers/embedding-sdk-component-testing/component-embedding-sdk-helpers.tsxindex 6631c55b587..0fee3deb9d7 100644--- a/e2e/support/helpers/embedding-sdk-component-testing/component-embedding-sdk-helpers.tsx+++ b/e2e/support/helpers/embedding-sdk-component-testing/component-embedding-sdk-helpers.tsx@@ -61,7 +61,9 @@ export function mountSdkContent(}if (waitForUser) {- cy.wait("@getUser").then(({ response }) => {+ // When running stress tests with network throttling, the request can take longer to complete+ // as it first needs to fetch the bundle from the server+ cy.wait("@getUser", { timeout: 20_000 }).then(({ response }) => {expect(response?.statusCode).to.equal(200);});}