Skip to content
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
30 changes: 30 additions & 0 deletions .github/workflows/pr-flowvault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,33 @@ jobs:
flags: flowvault
name: codecov-skyflow-python-flowvault
verbose: true

smoke:
name: Clean-install smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.9'

# Build the wheel (it bundles the sibling common/ tree via setup.py's
# custom build_py), then install ONLY that wheel into a fresh virtualenv
# and import it. The venv contains just the wheel's declared runtime
# dependencies, so a dependency missing from setup.py fails the import
# here -- the unit-test job installs dev deps and would mask it.
- name: Build the flowvault wheel
run: |
python -m pip install --upgrade pip setuptools wheel
cd flowvault
python setup.py bdist_wheel

- name: Install the wheel in a clean venv and import
run: |
python -m venv /tmp/smoke
/tmp/smoke/bin/pip install --upgrade pip
/tmp/smoke/bin/pip install flowvault/dist/*.whl
# Import from outside the repo so the source tree (flowvault/skyflow,
# ./common) is not on sys.path -- this exercises the installed wheel.
cd /tmp
/tmp/smoke/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; from skyflow.vault.data import InsertRequest, GetRequest, UpdateRequest, DeleteRequest, DetokenizeRequest, InsertOptions, GetOptions, UpdateOptions, DeleteOptions, DetokenizeOptions; from skyflow.vault.controller import VaultController; print('clean-install import OK')"
22 changes: 22 additions & 0 deletions .github/workflows/shared-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,28 @@ jobs:
cd "$MODULE"
python setup.py sdist bdist_wheel

# Gate: install each freshly built artifact into its own clean virtualenv
# (only the package's DECLARED runtime deps present) and import it from
# outside the repo. This runs before either publish step and even on a
# dry run, so a missing runtime dependency in setup.py or a
# non-self-contained sdist fails here rather than shipping a broken
# release (both packages import as `skyflow` and bundle `common`).
- name: Smoke test the built package (clean install + import)
run: |
set -e
WHEEL=$(ls "$MODULE"/dist/*.whl)
SDIST=$(ls "$MODULE"/dist/*.tar.gz)

python -m venv /tmp/smoke-wheel
/tmp/smoke-wheel/bin/pip install --upgrade pip
/tmp/smoke-wheel/bin/pip install "$WHEEL"
(cd /tmp && /tmp/smoke-wheel/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; print('wheel clean-install import OK')")

python -m venv /tmp/smoke-sdist
/tmp/smoke-sdist/bin/pip install --upgrade pip setuptools wheel
/tmp/smoke-sdist/bin/pip install "$SDIST"
(cd /tmp && /tmp/smoke-sdist/bin/python -c "import skyflow, common; from skyflow import Skyflow, Env, LogLevel; print('sdist clean-install import OK')")

- name: Publish to PyPI
if: ${{ (inputs.tag == 'beta' || inputs.tag == 'public') && inputs.dry-run != true }}
env:
Expand Down
1 change: 1 addition & 0 deletions flowvault/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def run(self):
'PyJWT >= 2.12, < 3',
'cryptography >= 44.0.2',
'httpx >= 0.21.2',
'python-dotenv >= 1.1.0, < 2',
# NOTE: 'requests' intentionally omitted -- only used today by v2's Connection
# controller, which isn't part of v3's scope this round.
],
Expand Down
Loading