Skip to content

[Experimental] Async-only local execution in thread-less runtimes (Pyodide/WASM) #5260

[Experimental] Async-only local execution in thread-less runtimes (Pyodide/WASM)

[Experimental] Async-only local execution in thread-less runtimes (Pyodide/WASM) #5260

Workflow file for this run

name: Lint and Import Profile Check
on:
push:
branches:
- main
- 'release-v**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
lint:
name: make fmt
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: ./.github/actions/setup-python-env
with:
python-version: '3.12'
- name: Lint
run: |
make fmt
git diff --exit-code
check-flyteidl2-versions:
name: check flyteidl2 versions
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Check flyteidl2 version consistency
run: |
# Extract flyteidl2 version from root pyproject.toml
ROOT_VER=$(grep 'flyteidl2==' pyproject.toml | head -1 | sed 's/.*flyteidl2==\([^"]*\).*/\1/')
echo "Root pyproject.toml: flyteidl2==$ROOT_VER"
# Extract flyteidl2 version from rs_controller/Cargo.toml
CARGO_VER=$(grep 'flyteidl2' rs_controller/Cargo.toml | grep -v '^#' | sed 's/.*"=\(.*\)".*/\1/')
echo "rs_controller/Cargo.toml: flyteidl2=$CARGO_VER"
# Extract flyteidl2 version from rs_controller/pyproject.toml
RS_VER=$(grep 'flyteidl2==' rs_controller/pyproject.toml | head -1 | sed 's/.*flyteidl2==\([^"]*\).*/\1/')
echo "rs_controller/pyproject.toml: flyteidl2==$RS_VER"
# Compare all three
if [ "$ROOT_VER" != "$CARGO_VER" ] || [ "$ROOT_VER" != "$RS_VER" ]; then
echo "ERROR: flyteidl2 versions do not match!"
echo " pyproject.toml: $ROOT_VER"
echo " rs_controller/Cargo.toml: $CARGO_VER"
echo " rs_controller/pyproject.toml: $RS_VER"
exit 1
fi
echo "All flyteidl2 versions match: $ROOT_VER"
rs-fmt:
name: rust fmt
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Cache Cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rs_controller/target
key: ${{ runner.os }}-cargo-fmt-${{ hashFiles('rs_controller/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-fmt-
- name: Install nightly toolchain
run: |
rustup toolchain install nightly
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
- name: fmt
run: |
make -C rs_controller check-fmt
rs-lint:
name: rust lint
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Cache Cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rs_controller/target
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('rs_controller/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
- name: Install toolchain
run: |
rustup toolchain install
- name: lint
run: |
make -C rs_controller lint
mypy:
name: make mypy
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: ./.github/actions/setup-python-env
with:
python-version: '3.12'
- name: mypy
run: |
make mypy
cli-docs-gen:
name: make cli-docs-gen
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: ./.github/actions/setup-python-env
with:
python-version: '3.12'
- name: Generate docs
run: |
make cli-docs-gen
uv-lock-check:
name: check uv.lock
runs-on: ubuntu-latest
steps:
- name: Fetch the code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: ./.github/actions/setup-python-env
- name: Check root uv.lock
run: |
uv lock --check
- name: Check plugin uv.lock files
run: |
for dir in plugins/*/; do
if [ -f "$dir/uv.lock" ]; then
echo "Checking $dir..."
uv lock --check --directory "$dir"
fi
done
# # Disabled for now, as it is failing
# check-import-profile:
# runs-on: ubuntu-latest
# steps:
# - name: Fetch the code
# uses: actions/checkout@v4
# - name: Set up Python 3.13
# uses: actions/setup-python@v4
# with:
# python-version: 3.13
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install uv
# uv pip install --system -e .
# - name: Run Import Profile Check
# run: |
# make check-import-profile