From 5a3ff925217871161a246ea00494ce984a3dec08 Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Sat, 24 Feb 2024 11:38:49 +0100 Subject: [PATCH 1/3] extra telemetry guarding --- .github/workflows/ci-fast.yml | 3 +++ .github/workflows/ci-slow.yml | 3 +++ .github/workflows/unit-test.yml | 3 +++ scripts/test-migrations-mariadb.sh | 7 +++++++ scripts/test-migrations-mysql.sh | 3 +++ 5 files changed, 19 insertions(+) diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml index dc1ee2aef6..2c1441f883 100644 --- a/.github/workflows/ci-fast.yml +++ b/.github/workflows/ci-fast.yml @@ -30,6 +30,9 @@ jobs: run: bash scripts/docstring.sh sqlite-db-migration-testing: runs-on: ubuntu-dind-runners + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true # if team member commented, not a draft, on a PR, using /fulltest if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch' steps: diff --git a/.github/workflows/ci-slow.yml b/.github/workflows/ci-slow.yml index 9bb276979b..fbdd3e5d71 100644 --- a/.github/workflows/ci-slow.yml +++ b/.github/workflows/ci-slow.yml @@ -63,6 +63,9 @@ jobs: python-version: '3.9' - name: Test migrations across versions run: bash scripts/test-migrations-mysql.sh sqlite + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true small-checks: if: github.event.pull_request.draft == false needs: run-slow-ci-label-is-set diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 2068ec0c79..b6d758026f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -100,6 +100,9 @@ jobs: - name: Run unit tests run: | bash scripts/test-coverage-xml.sh unit + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true # - name: Upload coverage # # only do it for python 3.8, we don't need to do it for every version diff --git a/scripts/test-migrations-mariadb.sh b/scripts/test-migrations-mariadb.sh index 69a8461da9..9808b543c3 100755 --- a/scripts/test-migrations-mariadb.sh +++ b/scripts/test-migrations-mariadb.sh @@ -33,6 +33,10 @@ function run_tests_for_version() { } echo "===== Testing MariaDB =====" + +export ZENML_ANALYTICS_OPT_IN=false +export ZENML_DEBUG=true + # run a mariadb instance in docker docker run --name mariadb -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password mariadb:10.6 # mariadb takes a while to start up @@ -55,6 +59,9 @@ do pip3 install -U pip setuptools wheel pip3 install "zenml[templates,server]==$VERSION" + export ZENML_ANALYTICS_OPT_IN=false + export ZENML_DEBUG=true + zenml connect --url mysql://127.0.0.1/zenml --username root --password password # Run the tests for this version diff --git a/scripts/test-migrations-mysql.sh b/scripts/test-migrations-mysql.sh index ee6f803c1e..e8a66c444a 100755 --- a/scripts/test-migrations-mysql.sh +++ b/scripts/test-migrations-mysql.sh @@ -3,6 +3,9 @@ DB="sqlite" DB_STARTUP_DELAY=30 # Time in seconds to wait for the database container to start +export ZENML_ANALYTICS_OPT_IN=false +export ZENML_DEBUG=true + if [ -z "$1" ]; then echo "No argument passed, using default: $DB" else From c19cbf304837ad2d24a7034609a2b931500cf77e Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Sat, 24 Feb 2024 11:46:08 +0100 Subject: [PATCH 2/3] editable installs --- .github/workflows/ci-slow.yml | 6 +++--- .github/workflows/release.yml | 9 +++++++++ scripts/test-migrations-mariadb.sh | 4 +++- scripts/test-migrations-mysql.sh | 4 +++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-slow.yml b/.github/workflows/ci-slow.yml index fbdd3e5d71..638ac8e39c 100644 --- a/.github/workflows/ci-slow.yml +++ b/.github/workflows/ci-slow.yml @@ -54,6 +54,9 @@ jobs: sqlite-db-migration-testing: if: github.event.pull_request.draft == false needs: run-slow-ci-label-is-set + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true runs-on: ubuntu-dind-runners steps: - uses: actions/checkout@v4.1.1 @@ -63,9 +66,6 @@ jobs: python-version: '3.9' - name: Test migrations across versions run: bash scripts/test-migrations-mysql.sh sqlite - env: - ZENML_ANALYTICS_OPT_IN: false - ZENML_DEBUG: true small-checks: if: github.event.pull_request.draft == false needs: run-slow-ci-label-is-set diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2719090619..a0c4755231 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,9 @@ jobs: run: pip check mysql-db-migration-testing: runs-on: ubuntu-dind-runners + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true steps: - name: Checkout code uses: actions/checkout@v4.1.1 @@ -41,6 +44,9 @@ jobs: run: bash scripts/test-migrations-mysql.sh mysql sqlite-db-migration-testing: runs-on: ubuntu-dind-runners + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true steps: - name: Checkout code uses: actions/checkout@v4.1.1 @@ -52,6 +58,9 @@ jobs: run: bash scripts/test-migrations-mysql.sh sqlite mariadb-db-migration-testing: runs-on: ubuntu-dind-runners + env: + ZENML_ANALYTICS_OPT_IN: false + ZENML_DEBUG: true steps: - name: Checkout code uses: actions/checkout@v4.1.1 diff --git a/scripts/test-migrations-mariadb.sh b/scripts/test-migrations-mariadb.sh index 9808b543c3..0e75e0de11 100755 --- a/scripts/test-migrations-mariadb.sh +++ b/scripts/test-migrations-mariadb.sh @@ -57,7 +57,9 @@ do # Install the specific version pip3 install -U pip setuptools wheel - pip3 install "zenml[templates,server]==$VERSION" + + git checkout release/$VERSION + pip3 install -e ".[templates,server]" export ZENML_ANALYTICS_OPT_IN=false export ZENML_DEBUG=true diff --git a/scripts/test-migrations-mysql.sh b/scripts/test-migrations-mysql.sh index e8a66c444a..62ab3d36d2 100755 --- a/scripts/test-migrations-mysql.sh +++ b/scripts/test-migrations-mysql.sh @@ -75,7 +75,9 @@ do # Install the specific version pip3 install -U pip setuptools wheel - pip3 install "zenml[templates,server]==$VERSION" + + git checkout release/$VERSION + pip3 install -e ".[templates,server]" # handles unpinned sqlmodel dependency in older versions pip3 install "sqlmodel==0.0.8" "bcrypt==4.0.1" From a69bf3dc5eec1c7312febe51aa691131d3af5889 Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Sat, 24 Feb 2024 11:54:20 +0100 Subject: [PATCH 3/3] git takes all branches now --- .github/workflows/ci-fast.yml | 2 ++ .github/workflows/ci-slow.yml | 2 ++ .github/workflows/release.yml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml index 2c1441f883..bce0617571 100644 --- a/.github/workflows/ci-fast.yml +++ b/.github/workflows/ci-fast.yml @@ -38,6 +38,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Python 3.9 uses: actions/setup-python@v5.0.0 with: diff --git a/.github/workflows/ci-slow.yml b/.github/workflows/ci-slow.yml index 638ac8e39c..cfb4a3019d 100644 --- a/.github/workflows/ci-slow.yml +++ b/.github/workflows/ci-slow.yml @@ -60,6 +60,8 @@ jobs: runs-on: ubuntu-dind-runners steps: - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Python 3.9 uses: actions/setup-python@v5.0.0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0c4755231..a37f1e096e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Python 3.9 uses: actions/setup-python@v5.0.0 with: @@ -50,6 +52,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Python 3.9 uses: actions/setup-python@v5.0.0 with: @@ -64,6 +68,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - name: Set up Python 3.9 uses: actions/setup-python@v4.8.0 with: