From a3cbb6d56e951b652196c7500ed0c6baf09d29f3 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Wed, 12 Jul 2023 15:55:04 +0300 Subject: [PATCH 01/26] made it fail --- src/firebolt/db/cursor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firebolt/db/cursor.py b/src/firebolt/db/cursor.py index 69c84a81115..108232c4059 100644 --- a/src/firebolt/db/cursor.py +++ b/src/firebolt/db/cursor.py @@ -152,7 +152,7 @@ def _validate_set_parameter(self, parameter: SetParameter) -> None: self._raise_if_error(resp) # set parameter passed validation - self._set_parameters[parameter.name] = parameter.value + self._set_parameters[parameter.nam] = parameter.value def _do_execute( self, From e6e19711dd387cb7c72e13b25713cf09a96ee567 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Wed, 12 Jul 2023 15:57:01 +0300 Subject: [PATCH 02/26] added lf flag --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7409b711e98..743d9a1c2fa 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -39,7 +39,7 @@ jobs: - name: Run unit tests run: | - pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + pytest -lf --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From 278d0e896b399ae540991dd267299ae6ea45d41e Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 13 Jul 2023 13:18:30 +0300 Subject: [PATCH 03/26] deleted lf --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 743d9a1c2fa..7409b711e98 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -39,7 +39,7 @@ jobs: - name: Run unit tests run: | - pytest -lf --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From f642b08befbb55d050e1f7a981cdce721416082c Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 13 Jul 2023 13:32:09 +0300 Subject: [PATCH 04/26] Updated lf flag --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7409b711e98..c9b991e5714 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -39,7 +39,7 @@ jobs: - name: Run unit tests run: | - pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + pytest --lf --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From 4a46f59afd3d1b5537e899866d24fa4b260a17fb Mon Sep 17 00:00:00 2001 From: RotemFB Date: Sun, 16 Jul 2023 10:22:46 +0300 Subject: [PATCH 05/26] last failed flag --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c9b991e5714..318e96c4109 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -39,7 +39,7 @@ jobs: - name: Run unit tests run: | - pytest --lf --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From 6d0e0f03a6e5364e91de35fcb0afcbc6409117e1 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Mon, 17 Jul 2023 10:40:03 +0300 Subject: [PATCH 06/26] Trying integration --- .github/workflows/integration-tests.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index edd3ff06ed2..a581bdbfc34 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,14 +62,14 @@ jobs: echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET }}" >> "$GITHUB_ENV" fi - - name: Setup database and engine - id: setup - uses: firebolt-db/integration-testing-setup@v1 - with: - firebolt-username: ${{ env.USERNAME }} - firebolt-password: ${{ env.PASSWORD }} - api-endpoint: "api.${{ inputs.environment }}.firebolt.io" - region: "us-east-1" +# - name: Setup database and engine + # id: setup + # uses: firebolt-db/integration-testing-setup@v1 + # with: + # firebolt-username: ${{ env.USERNAME }} + # firebolt-password: ${{ env.PASSWORD }} + # api-endpoint: "api.${{ inputs.environment }}.firebolt.io" + # region: "us-east-1" - name: Run integration tests env: @@ -85,7 +85,7 @@ jobs: API_ENDPOINT: "api.${{ inputs.environment }}.firebolt.io" ACCOUNT_NAME: "firebolt" run: | - pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results + pytest --last-failed -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From 38e5d866be468ef508374fd8b73dcbca80e2cb57 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Mon, 17 Jul 2023 14:04:15 +0300 Subject: [PATCH 07/26] Added cache --- .github/workflows/unit-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 318e96c4109..ec5bad8ed70 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,6 +27,13 @@ jobs: with: ref: ${{ github.event.inputs.branch }} + - name: Cache Test Results + id: cache-tests + uses: actions/cache@v3 + with: + path: .pytest_cache + key: ${{ runner.os }}-pytest-failed-${{ github.ref }} + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: From 1634cfb4a484c3bb3a5ab4e7097a51eb574fd9e2 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Mon, 17 Jul 2023 15:14:02 +0300 Subject: [PATCH 08/26] added cache dir --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ec5bad8ed70..696f75de538 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,7 +46,7 @@ jobs: - name: Run unit tests run: | - pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results --cache-dir=.pytest_cache - name: Get Allure history uses: actions/checkout@v2 From 8d4dea88a7e1c68236463ca1a48f807ed7869233 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Mon, 17 Jul 2023 15:48:04 +0300 Subject: [PATCH 09/26] specified the cache for the pytest --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 696f75de538..251e7b41fb4 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,7 +46,7 @@ jobs: - name: Run unit tests run: | - pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results --cache-dir=.pytest_cache + pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results -d .pytest_cache - name: Get Allure history uses: actions/checkout@v2 From f7d3304811a77a57c0fffba84a19d6f711e4d077 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Mon, 17 Jul 2023 17:26:19 +0300 Subject: [PATCH 10/26] added save and restore --- .github/workflows/unit-tests.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 251e7b41fb4..733f179c1be 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,12 +27,13 @@ jobs: with: ref: ${{ github.event.inputs.branch }} - - name: Cache Test Results - id: cache-tests - uses: actions/cache@v3 + - name: Restore cached failed tests + id: cache-tests-restore + uses: actions/cache/restore@v3 with: - path: .pytest_cache - key: ${{ runner.os }}-pytest-failed-${{ github.ref }} + path: | + ../../.pytest_cache/v/cache/lastfailed + key: pytest-restore-failed-${{ github.ref }} - name: Set up Python 3.7 uses: actions/setup-python@v2 @@ -46,7 +47,15 @@ jobs: - name: Run unit tests run: | - pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results -d .pytest_cache + pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + + - name: Save tailed tests + id: cache-tests-save + uses: actions/cache/save@v3 + with: + path: | + ../../.pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} - name: Get Allure history uses: actions/checkout@v2 From b293c53b1e2f0fe6a8e4db1b274993adc14ee35b Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 10:22:14 +0300 Subject: [PATCH 11/26] another try --- .github/workflows/unit-tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 733f179c1be..4da9f6ec571 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -49,14 +49,6 @@ jobs: run: | pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - - name: Save tailed tests - id: cache-tests-save - uses: actions/cache/save@v3 - with: - path: | - ../../.pytest_cache/v/cache/lastfailed - key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} - - name: Get Allure history uses: actions/checkout@v2 if: always() @@ -65,6 +57,14 @@ jobs: ref: gh-pages path: gh-pages + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + with: + path: | + ../../.pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + - name: Allure Report uses: firebolt-db/action-allure-report@v1 if: always() From 0265822eed875a2c7d5516ed81aadbf44bc66184 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 10:37:11 +0300 Subject: [PATCH 12/26] new path --- .github/workflows/unit-tests.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4da9f6ec571..ecf46e39bba 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache/restore@v3 with: path: | - ../../.pytest_cache/v/cache/lastfailed + .pytest_cache/v/cache/lastfailed key: pytest-restore-failed-${{ github.ref }} - name: Set up Python 3.7 @@ -49,6 +49,14 @@ jobs: run: | pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + with: + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + - name: Get Allure history uses: actions/checkout@v2 if: always() @@ -56,14 +64,6 @@ jobs: with: ref: gh-pages path: gh-pages - - - name: Save failed tests - id: cache-tests-save - uses: actions/cache/save@v3 - with: - path: | - ../../.pytest_cache/v/cache/lastfailed - key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} - name: Allure Report uses: firebolt-db/action-allure-report@v1 From 96bcebad53b5d85037ad7271c91ff91b4035e836 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 10:45:04 +0300 Subject: [PATCH 13/26] updated key --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ecf46e39bba..e562506bfe6 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -55,7 +55,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + key: pytest-restore-failed-${{ github.ref }} - name: Get Allure history uses: actions/checkout@v2 From 540fe8e9e882f4811da8cc5b0da08015dd03dde2 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 10:56:29 +0300 Subject: [PATCH 14/26] save is in run test --- .github/workflows/unit-tests.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e562506bfe6..fb17de6aa3d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,16 +46,21 @@ jobs: pip install -e ".[dev]" - name: Run unit tests - run: | - pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - - - name: Save failed tests - id: cache-tests-save uses: actions/cache/save@v3 with: path: | .pytest_cache/v/cache/lastfailed key: pytest-restore-failed-${{ github.ref }} + run: | + pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results + +# - name: Save failed tests + # id: cache-tests-save + # uses: actions/cache/save@v3 + # with: + # path: | + # .pytest_cache/v/cache/lastfailed + # key: pytest-restore-failed-${{ github.ref }} - name: Get Allure history uses: actions/checkout@v2 From 7c447f3cf24ae771e12ea611c7608894ea2cc25c Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 11:04:04 +0300 Subject: [PATCH 15/26] new method --- .github/workflows/unit-tests.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index fb17de6aa3d..4e91b00d1c5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -31,9 +31,8 @@ jobs: id: cache-tests-restore uses: actions/cache/restore@v3 with: - path: | - .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} + path: .pytest_cache + key: pytest-failed-${{ github.ref }} - name: Set up Python 3.7 uses: actions/setup-python@v2 @@ -46,21 +45,16 @@ jobs: pip install -e ".[dev]" - name: Run unit tests - uses: actions/cache/save@v3 - with: - path: | - .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} + id: test-with-cache run: | pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results -# - name: Save failed tests - # id: cache-tests-save - # uses: actions/cache/save@v3 - # with: - # path: | - # .pytest_cache/v/cache/lastfailed - # key: pytest-restore-failed-${{ github.ref }} + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + with: + path: ${{ steps.test-with-cache.outputs.cache-directory }} + key: pytest-failed-${{ github.ref }} - name: Get Allure history uses: actions/checkout@v2 From d06345098fa595fd4c1bf4de443ba0b7f2a0d771 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 11:23:19 +0300 Subject: [PATCH 16/26] added always condition --- .github/workflows/unit-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4e91b00d1c5..5a22989609e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -52,6 +52,7 @@ jobs: - name: Save failed tests id: cache-tests-save uses: actions/cache/save@v3 + if: always() with: path: ${{ steps.test-with-cache.outputs.cache-directory }} key: pytest-failed-${{ github.ref }} From f3d58873babc4caa707d6d93a841f4d14e82bf95 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 11:27:57 +0300 Subject: [PATCH 17/26] another try --- .github/workflows/unit-tests.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5a22989609e..957f43bd7d6 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -31,8 +31,9 @@ jobs: id: cache-tests-restore uses: actions/cache/restore@v3 with: - path: .pytest_cache - key: pytest-failed-${{ github.ref }} + path: | + .pytest_cache/v/cache/lastfailed + key: pytest-restore-failed-${{ github.ref }} - name: Set up Python 3.7 uses: actions/setup-python@v2 @@ -45,7 +46,6 @@ jobs: pip install -e ".[dev]" - name: Run unit tests - id: test-with-cache run: | pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results @@ -54,8 +54,9 @@ jobs: uses: actions/cache/save@v3 if: always() with: - path: ${{ steps.test-with-cache.outputs.cache-directory }} - key: pytest-failed-${{ github.ref }} + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} - name: Get Allure history uses: actions/checkout@v2 From f1748c742c642d0628815e9a4e11dec7b8dbd92b Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 11:44:12 +0300 Subject: [PATCH 18/26] cache for integration and nightly --- .github/workflows/integration-tests.yml | 17 +++++++++++++++++ .github/workflows/nightly-workflow.yml | 19 ++++++++++++++++++- .github/workflows/unit-tests.yml | 16 ++++++++-------- 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a581bdbfc34..d4255bafdda 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -71,6 +71,14 @@ jobs: # api-endpoint: "api.${{ inputs.environment }}.firebolt.io" # region: "us-east-1" + - name: Restore cached failed tests + id: cache-tests-restore + uses: actions/cache/restore@v3 + with: + path: | + .pytest_cache/v/cache/lastfailed + key: pytest-restore-failed-${{ github.ref }} + - name: Run integration tests env: USER_NAME: ${{ env.USERNAME }} @@ -87,6 +95,15 @@ jobs: run: | pytest --last-failed -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + if: always() + with: + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + - name: Get Allure history uses: actions/checkout@v2 if: always() diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index 4805ce0b98e..d667e708ad0 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -67,6 +67,14 @@ jobs: region: "us-east-1" db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} + - name: Restore cached failed tests + id: cache-tests-restore + uses: actions/cache/restore@v3 + with: + path: | + .pytest_cache/v/cache/lastfailed + key: pytest-restore-failed-${{ github.ref }} + - name: Run integration tests env: USER_NAME: ${{ secrets.FIREBOLT_STG_USERNAME }} @@ -81,8 +89,17 @@ jobs: ACCOUNT_NAME: "firebolt" API_ENDPOINT: "api.staging.firebolt.io" run: | - pytest --timeout_method "thread" -o log_cli=true -o log_cli_level=INFO --junit-xml=report/junit.xml tests/integration + pytest --last-failed --timeout_method "thread" -o log_cli=true -o log_cli_level=INFO --junit-xml=report/junit.xml tests/integration + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + if: always() + with: + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + - name: Foresight Test / Coverage Results uses: runforesight/foresight-test-kit-action@v1 if: success() || failure() diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 957f43bd7d6..9190550dbef 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,14 +27,6 @@ jobs: with: ref: ${{ github.event.inputs.branch }} - - name: Restore cached failed tests - id: cache-tests-restore - uses: actions/cache/restore@v3 - with: - path: | - .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} - - name: Set up Python 3.7 uses: actions/setup-python@v2 with: @@ -45,6 +37,14 @@ jobs: python -m pip install --upgrade pip pip install -e ".[dev]" + - name: Restore cached failed tests + id: cache-tests-restore + uses: actions/cache/restore@v3 + with: + path: | + .pytest_cache/v/cache/lastfailed + key: pytest-restore-failed-${{ github.ref }} + - name: Run unit tests run: | pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results From caedef65a297cd083449e0d7687e1faffd5644f4 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 12:51:16 +0300 Subject: [PATCH 19/26] added sha and os to the key --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index d4255bafdda..bc3c88d73ef 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -77,7 +77,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index d667e708ad0..bd05195614b 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -73,7 +73,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 9190550dbef..38c6631cec2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -43,7 +43,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: pytest-restore-failed-${{ github.ref }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run unit tests run: | From c8634dc64f30ca6b9661e5d958322d3554dfaa18 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Tue, 18 Jul 2023 13:35:49 +0300 Subject: [PATCH 20/26] fixed the cause of the errors --- .github/workflows/integration-tests.yml | 16 ++++++++-------- src/firebolt/db/cursor.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bc3c88d73ef..3ddc538ae6b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,14 +62,14 @@ jobs: echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET }}" >> "$GITHUB_ENV" fi -# - name: Setup database and engine - # id: setup - # uses: firebolt-db/integration-testing-setup@v1 - # with: - # firebolt-username: ${{ env.USERNAME }} - # firebolt-password: ${{ env.PASSWORD }} - # api-endpoint: "api.${{ inputs.environment }}.firebolt.io" - # region: "us-east-1" + - name: Setup database and engine + id: setup + uses: firebolt-db/integration-testing-setup@v1 + with: + firebolt-username: ${{ env.USERNAME }} + firebolt-password: ${{ env.PASSWORD }} + api-endpoint: "api.${{ inputs.environment }}.firebolt.io" + region: "us-east-1" - name: Restore cached failed tests id: cache-tests-restore diff --git a/src/firebolt/db/cursor.py b/src/firebolt/db/cursor.py index 108232c4059..69c84a81115 100644 --- a/src/firebolt/db/cursor.py +++ b/src/firebolt/db/cursor.py @@ -152,7 +152,7 @@ def _validate_set_parameter(self, parameter: SetParameter) -> None: self._raise_if_error(resp) # set parameter passed validation - self._set_parameters[parameter.nam] = parameter.value + self._set_parameters[parameter.name] = parameter.value def _do_execute( self, From b590a92f392ab4aae5214aa30c8a671d739dcef9 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Wed, 19 Jul 2023 12:13:42 +0300 Subject: [PATCH 21/26] fixed CR comments --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- .github/workflows/unit-tests.yml | 19 +------------------ 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3ddc538ae6b..7bfbf49696e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -98,7 +98,7 @@ jobs: - name: Save failed tests id: cache-tests-save uses: actions/cache/save@v3 - if: always() + if: failure() with: path: | .pytest_cache/v/cache/lastfailed diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index bd05195614b..22789a76c14 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -94,7 +94,7 @@ jobs: - name: Save failed tests id: cache-tests-save uses: actions/cache/save@v3 - if: always() + if: failure() with: path: | .pytest_cache/v/cache/lastfailed diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 38c6631cec2..ded31bd0af6 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -36,27 +36,10 @@ jobs: run: | python -m pip install --upgrade pip pip install -e ".[dev]" - - - name: Restore cached failed tests - id: cache-tests-restore - uses: actions/cache/restore@v3 - with: - path: | - .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run unit tests run: | - pytest --last-failed --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - - - name: Save failed tests - id: cache-tests-save - uses: actions/cache/save@v3 - if: always() - with: - path: | - .pytest_cache/v/cache/lastfailed - key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - name: Get Allure history uses: actions/checkout@v2 From 7ea81dce421fdf090cb0dd4a3f68744ef0e12fb7 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Wed, 19 Jul 2023 12:18:05 +0300 Subject: [PATCH 22/26] deleted spaces --- .github/workflows/unit-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ded31bd0af6..7409b711e98 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -36,11 +36,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -e ".[dev]" - + - name: Run unit tests run: | pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results - + - name: Get Allure history uses: actions/checkout@v2 if: always() @@ -48,7 +48,7 @@ jobs: with: ref: gh-pages path: gh-pages - + - name: Allure Report uses: firebolt-db/action-allure-report@v1 if: always() From e2afa893b89af79b73e1e98a9e76f40a99a20180 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 20 Jul 2023 10:34:06 +0300 Subject: [PATCH 23/26] changed os to label --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7bfbf49696e..64c391aeb43 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -77,7 +77,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.label }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index 22789a76c14..18286221269 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -73,7 +73,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.label }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: From e813e50c6da602cdd82d8a51e1e48e349aeddd1b Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 20 Jul 2023 10:54:48 +0300 Subject: [PATCH 24/26] returned to os --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 64c391aeb43..7bfbf49696e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -77,7 +77,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.label }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index 18286221269..22789a76c14 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -73,7 +73,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.label }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: From 651d4d8973420b126ca0143b43b4624896af5b4d Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 20 Jul 2023 11:12:16 +0300 Subject: [PATCH 25/26] replaced os to env.RUNNER_LABEL --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7bfbf49696e..3876f4da298 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -77,7 +77,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ env.RUNNER_LABEL }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index 22789a76c14..c3402a88475 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -73,7 +73,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ env.RUNNER_LABEL }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: From 510dfdd002720815a8022d4642b351fbcc48a1b5 Mon Sep 17 00:00:00 2001 From: RotemFB Date: Thu, 20 Jul 2023 11:29:50 +0300 Subject: [PATCH 26/26] os again --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/nightly-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3876f4da298..7bfbf49696e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -77,7 +77,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ env.RUNNER_LABEL }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: diff --git a/.github/workflows/nightly-workflow.yml b/.github/workflows/nightly-workflow.yml index c3402a88475..22789a76c14 100644 --- a/.github/workflows/nightly-workflow.yml +++ b/.github/workflows/nightly-workflow.yml @@ -73,7 +73,7 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ env.RUNNER_LABEL }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - name: Run integration tests env: