Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3a16ccb
remove old protos
wild-endeavor Feb 16, 2026
f7e685c
use native roots
wild-endeavor Feb 16, 2026
cd3cbff
remove the pem download with with_native_roots
wild-endeavor Feb 16, 2026
4fd4b6b
add no default features to maturin
wild-endeavor Feb 16, 2026
c242102
bringing in #flyte-sdk/607
wild-endeavor Feb 16, 2026
02c5da6
merge main
wild-endeavor Feb 16, 2026
42fdc80
rename RunAbortedError to ActionAbortedError flyte-sdk/#521
wild-endeavor Feb 16, 2026
8d7a4ca
pull in #flyte-sdk/621
wild-endeavor Feb 16, 2026
cc0a184
Merge branch 'ctrl-rs' into revisit-protos
wild-endeavor Feb 16, 2026
a7addbf
bump pyproject
wild-endeavor Feb 16, 2026
9921440
add temp wheel to more examples
wild-endeavor Feb 16, 2026
32fa26e
PR into #675 (#676)
wild-endeavor Feb 17, 2026
7252bd7
add mac
wild-endeavor Feb 17, 2026
e8eef04
change sed command
wild-endeavor Feb 17, 2026
63a2b13
Merge branch 'ctrl-rs' of github.com:flyteorg/flyte-sdk into revisit-…
machichima May 6, 2026
1bf3a42
build: update flyteidl2 version to 2.0.13
machichima May 6, 2026
3a11bd2
fix: pass tctx and workers
machichima May 6, 2026
a70cda6
feat: load rust controller dist into image automatically
machichima May 6, 2026
5d7eecd
fix+docs: CI error + update readme
machichima May 6, 2026
697c41c
refactor: remove hard coded path in examples
machichima May 6, 2026
88a0634
build: uv lock
machichima May 6, 2026
195c97a
fix: only add rust controller if set flag
machichima May 7, 2026
740dba8
feat: add action service
machichima May 7, 2026
00b4527
feat: update flyteidl2 version to 2.0.15
machichima May 8, 2026
3fb2a5b
Merge branch 'main' of github.com:flyteorg/flyte-sdk into revisit-protos
machichima May 8, 2026
9ecbeab
Merge branch 'ctrl-rs' of github.com:flyteorg/flyte-sdk into revisit-…
machichima May 8, 2026
2e71c00
build+fix: update uv lock & rust fmt
machichima May 8, 2026
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
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,51 @@ jobs:
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"
Comment on lines +38 to +58
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this check can break if the format in pyproject.toml/Cargo.toml changed (e.g. flyteidl2==1.0.0 to "flyteidl2==1.0.0")? Maybe it's better to parse with python tomllib?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes probably, haven't really gone through these GH actions. i think we can merge this PR though - GH actions and devex ergonomics will take a bunch more additional work I think.

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
Expand All @@ -46,6 +85,16 @@ jobs:
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
Expand Down
90 changes: 89 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,95 @@ name: Publish
on:
release:
types: [published]
push:
branches: [revisit-protos-ci]
pull_request:
paths:
- ".github/workflows/publish.yml"
- "maint_tools/build_default_image.py"

jobs:
rs-controller-wheels:
name: Build RS controller wheel (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64
os: ubuntu-latest
- target: aarch64
os: ubuntu-24.04-arm
- target: aarch64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Set version from tag
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||')
else
VERSION="0.0.0.dev0"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
sed "s/^version = .*/version = \"$VERSION\"/" rs_controller/pyproject.toml > tmp && mv tmp rs_controller/pyproject.toml
echo "Set version to $VERSION"
cat rs_controller/pyproject.toml
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -m rs_controller/Cargo.toml
sccache: true
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: rs-controller-wheel-${{ matrix.target }}
path: dist/*.whl

rs-controller-publish:
name: Publish RS controller to PyPI
needs: rs-controller-wheels
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
pattern: rs-controller-wheel-*
merge-multiple: true
path: dist/
- name: Install twine
run: pip install twine
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --verbose dist/*
- name: Wait for PyPI availability
run: |
VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||')
LINK="https://pypi.org/project/flyte_controller_base/${VERSION}/"
echo "Waiting for $LINK"
for i in $(seq 1 60); do
if curl -L -I -s -f "$LINK"; then
echo "Found on PyPI: $LINK"
exit 0
else
echo "Attempt $i: not yet available, retrying in 10s..."
sleep 10
fi
done
echo "ERROR: timed out waiting for PyPI"
exit 1

flyte-pypi:
name: PyPI package
needs: rs-controller-publish
if: always() && (needs.rs-controller-publish.result == 'success' || needs.rs-controller-publish.result == 'skipped')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,18 +108,25 @@ jobs:
run: |
uv venv
uv pip install build twine setuptools wheel
- name: Pin flyte_controller_base version (release only)
if: github.event_name == 'release'
run: |
VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||')
sed -i "s/flyte_controller_base>=2.0.0b0/flyte_controller_base==${VERSION}/" pyproject.toml
echo "Pinned flyte_controller_base==${VERSION}"
grep flyte_controller_base pyproject.toml
- name: Build and publish
run: |
uv run python -m build --wheel --installer uv
- name: Publish
if: ${{ github.event_name == 'release' }}
working-directory: ${{ matrix.workdir }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
uv run python -m twine upload --verbose dist/*
- name: Sleep until pypi is available
if: ${{ github.event_name == 'release' }}
id: pypiwait
run: |
# from 'refs/tags/v1.2.3 get 1.2.3' and make sure it's not an empty string
Expand Down
12 changes: 11 additions & 1 deletion examples/basics/large_slow_run.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here seem to be for local testing? Should we remove it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can delete yeah. or delete in the main PR since it might still be useful for testing.

Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import asyncio
from pathlib import Path

import flyte
from flyte._image import PythonWheels

env = flyte.TaskEnvironment("large-slow-run")
controller_dist_folder = Path("/Users/ytong/go/src/github.com/flyteorg/sdk-rust/rs_controller/dist")
wheel_layer = PythonWheels(wheel_dir=controller_dist_folder, package_name="flyte_controller_base")
base = flyte.Image.from_debian_base()
rs_controller_image = base.clone(addl_layer=wheel_layer)

env = flyte.TaskEnvironment(
"large-slow-run",
image=rs_controller_image,
)


@env.task
Expand Down
9 changes: 9 additions & 0 deletions examples/stress/duplicate_action_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@
"""

import asyncio
from pathlib import Path

import flyte
from flyte._image import PythonWheels

controller_dist_folder = Path("/Users/ytong/go/src/github.com/flyteorg/sdk-rust/rs_controller/dist")
wheel_layer = PythonWheels(wheel_dir=controller_dist_folder, package_name="flyte_controller_base")
base = flyte.Image.from_debian_base()
rs_controller_image = base.clone(addl_layer=wheel_layer)

env_worker = flyte.TaskEnvironment(
name="worker",
resources=flyte.Resources(cpu=1, memory="250Mi"),
cache="disable",
image=rs_controller_image,
)

env_main = flyte.TaskEnvironment(
name="main",
resources=flyte.Resources(cpu=1, memory="250Mi"),
depends_on=[env_worker],
cache="disable",
image=rs_controller_image,
)


Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ dependencies = [
"async-lru>=2.0.5",
"mashumaro",
"aiolimiter>=1.2.1",
"flyteidl2==2.0.2",
"flyteidl2==2.0.6",
"flyte_controller_base>=2.0.0b0",
"packaging",
]

Expand Down Expand Up @@ -166,6 +167,9 @@ ignore = ["PGH003", "PLC0415", "ASYNC210", "ASYNC240", "FURB122"]
disable_error_code = ["import-untyped"]
ignore_missing_imports = true

[tool.uv.sources]
flyte_controller_base = { path = "rs_controller" }

[tool.ty.rules]
unused-ignore-comment = "warn"
redundant-cast = "ignore"
Expand Down
Loading
Loading