Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telemetry guarding for CI & editable installs #2468

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ 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:
- 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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ 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
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5.0.0
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ 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
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5.0.0
with:
Expand All @@ -41,9 +46,14 @@ 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
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5.0.0
with:
Expand All @@ -52,9 +62,14 @@ 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
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4.8.0
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion scripts/test-migrations-mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,7 +57,12 @@ 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

zenml connect --url mysql://127.0.0.1/zenml --username root --password password

Expand Down
7 changes: 6 additions & 1 deletion scripts/test-migrations-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,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"

Expand Down
Loading