Skip to content

v0.7.0

Latest

Choose a tag to compare

@k82cn k82cn released this 28 Oct 05:01
· 79 commits to main since this release
09ef00f

Flame 0.7.0 Release Notes

Status: released.

Release branch: release-0.7, cut from main at fa62ad8b88eeee81485d443ebf4ee2002fc3339f (October 25, 2026). v0.7.0 is a tag on this branch, and later 0.7.x releases are tagged on it too.
Previous release: v0.6.0.

These notes cover the 70 changes merged to main after the 0.6 release notes (#496), from #493 through #609, and the changes backported to release-0.7 after the branch was cut (listed under "Changes after the branch point"). v0.6.0 was tagged on release-0.6, so a plain v0.6.0...v0.7.0 compare also lists backports; use the range below for the first part.

Compare: f9662ea...fa62ad8 (the release-0.7 branch point)

Versions

Artifact Version
Git tag and Docker tag v0.7.0
Cargo (flame-rs, flame-rs-macros, workspace crates) 0.7.0
stdng 0.1.9 (changed since 0.1.8; published with rc3)
PyPI flamepy 0.7.0
Helm chart appVersion 0.7.0

Release candidates

v0.7.0-rc1, v0.7.0-rc2 and v0.7.0-rc3 were tagged on release-0.7; their separate release notes are folded into this document.

  • v0.7.0-rc1: the publish run failed in Release Metadata (the flamepy version was compared with terminal color codes), so nothing was published.
  • v0.7.0-rc2: the images were published; Publish flamepy failed in its installed-package check (it put the root of a virtual environment on PYTHONPATH, where flamepy is not importable), and Publish Rust crates failed with a crates.io 403.
  • v0.7.0-rc3: stdng 0.1.9, flame-rs-macros and flame-rs 0.7.0-rc3, the images and flamepy 0.7.0rc3 were published. The run still ended red, at the post-upload check of PyPI (see #653 below).

Highlights

Scheduling

  • DRF now orders sessions by dominant share and re-balances them toward a desired share. It no longer divides capacity by the number of open sessions, so an idle session no longer limits a busy one (#608). DRF's session ordering was also reversed before this change.
  • Gang scheduling uses batch_size; min_instances is only a floor that keeps instances alive (#591, #593, #599).
  • The priority plugin only orders sessions; MinMax owns executor demand (#568). Executor allocation is bounded by demand and by scoped limits (#564, #567).
  • Data-aware task routing and instance-level data-aware scheduling (#516, #517, #520).
  • Idle executors are reused before autoscaling (#529).

Sessions and applications

  • Suspend and resume sessions, and session deletion in flmctl and the SDKs (#603, #606, #600).
  • Disabled applications are reconciled after their sessions drain (#541, #542).
  • Session tokens are passed to instances (#559).
  • Per-executor cgroup for the host shim (#604, #609).

Sandbox, CRI and Kubernetes

  • flmbox sandbox CLI and service, and flamepy.agent.Sandbox (#605, #607).
  • CRI executor shim, with E2E and benchmark coverage (#526, #527, #528, #530); the CRI instance runtime image is published (#535).
  • Kubernetes executor managers run as host-shim DaemonSet workers (#561), GPUs are assigned through executor-manager device managers (#566), and the object cache runs in each executor-manager pod (#595).
  • External access and secure object-cache proxying, with client mTLS (#524, #553).
  • Images are built on native amd64 and arm64 runners (#563).

Object cache

  • Cache reads and writes stream through the storage engine, and each object is stored as append-only files (#585, #586).
  • Objects are addressed by their owning cache with cache.advertise (#587).
  • Opaque bytes over gRPC with typed metadata (#544); stale application cache data is garbage collected (#543).

Python SDK

  • flamepy.app replaces the Runner API (#537); flamepy.agent replaces the tools sandbox (#536); a Sandbox API for remote script execution (#514).
  • Async (aio) core SDK and async App services (#548); shared session task watches (#549); applications can be packaged for deploy and update (#551).
  • Faster cold start of a flamepy.app service (#590).

Performance and reliability

  • Task and payload writes are no longer fsynced, and only terminal task records are synced (#597, #598); the session manager frontend, backend and scheduler run on dedicated runtimes (#596, #597).
  • Filesystem storage locking and session lifecycle fixes, and executor lifecycle transitions published after persistence (#572, #576).
  • NVML is initialized once per executor manager (#580).

Tooling

  • flmbench, a multi-session burst benchmark (#581).
  • A testing/ directory with E2E, system stress and longevity tests, and the flame-test image (#582, #583).
  • The Python E2E, Rust E2E and Python system test workflows run on both a priority and a drf cluster (#608).

Changes after the branch point

Backported from main to release-0.7, one pull request each:

  • Agent Session runs on flmbox (#611, backport #618). flamepy.agent.Session ran scripts through flmexec on the executor host; it now runs them in flmbox sandboxes, like flamepy.agent.Sandbox.
    • run_code and submit_code return CommandResult (exit_code, stdout, stderr); SessionOutput is removed, and a nonzero exit is a normal result.
    • language is chosen per call (shell by default, or python), together with cwd, envs, input and timeout; open_session no longer takes language.
    • open_session(image=...) chooses the sandbox image and replaces runtime. The default flmbox image has no Python, so Python scripts need an image that has it, for example python:3.12-slim.
  • flmbox network (#613, backport #619). flmbox --network <none|host> (also FLMBOX_NETWORK and sandbox.network). The default stays none. The built-in flmbox application now starts as flmbox -d --network=host, so its sandboxes have every egress of the executor manager. That includes the Flame control plane, the node's own services, other pods and the cloud metadata address, so use it only where the code that sandboxes run is trusted. Remove --network=host from config/applications/flmbox.yaml to run sandboxes without a network. A per-sandbox network with egress rules is tracked in #612.
  • Sandbox.create(sandbox_id=...) (#614, backport #620). A sandbox can be created with a chosen id; an id that already exists is rejected by the server.
  • Executor notification dropped after an executor manager reconnects (#616, backport #621). The first notification sent to a node after its executor manager reconnected was lost, so a Void executor never started and the sessions allocated to it stalled until the session manager was restarted (issue #615). The stale watch consumer now stops with its stream, an executor taken just before a stream dies is queued again, and the failed-notification logs are raised to warn. Re-sending unregistered executors on watch start and a scheduler timeout for a Void executor are not part of this release.
  • Sandbox commands without a state request (#617, backport #622). Sandbox no longer asks the server for the session state before every command, which saves one round trip per command (about 360 ms from a client far from the cluster). A command for a suspended sandbox is accepted by the server and waits until the sandbox is resumed, instead of raising INVALID_STATE up front; a command for a sandbox closed through another handle is rejected by the server.
  • No executors on nodes that are not ready (#625, backport #627). The scheduler created executors, and reused Void and Idle ones, on nodes whose executor manager was not connected. Such an executor stayed Void and its session waited forever (seen after five nodes lost their executor managers; see #615). Allocate now creates executors only on Ready nodes, and an executor on a node that is not ready (including one that is draining) is skipped until the node is Ready again. Recovering executors already stranded by other causes is not part of this release.
  • Executors can retract published attributes (#633, backport #634; fixes #632). ExecutorAttributes carries publish (field 1, renamed from attr) and retract (field 2), so a service can withdraw keys when cached data is evicted or cleared. The session manager validates the whole update (each list at most 1,024 keys, 256 bytes per key and 64 KiB; a key cannot be in both lists) and applies it atomically, so a rejected update leaves the previous state unchanged. The Rust SDK gets unpublish on FlameInstance and FlameService; the Python SDK gets FlameService.unpublish and app.unpublish_attributes. Attributes stay volatile: they are not persisted, a replacement executor starts empty, and keys that are not retracted survive unbind and rebind.
  • A gang's min_instances and max_instances are tied to its size (#636, backport #639). A session with batch_size above 1 is now rejected, with INVALID_ARGUMENT, when it is created unless its min_instances is 0 or batch_size and its max_instances is unset or batch_size (the application's max_instances must also be at least batch_size). A gang kept warm (min_instances equal to batch_size) is formed all at once from the moment it exists; before, it was given idle executors one at a time between its creation and its first task, so a gang larger than the cluster could hold every executor and starve other sessions. It also sets single_line_if_else_max_width = 60 in rustfmt.toml.
  • Serving sessions accept task options (#641, backport #645). flamepy.serving.Session.run(req, option=None) and submit(req, option=None) take TaskOptions, for example TaskOptions(affinity={key}), so a serving client can use data-aware scheduling. A serving worker already published the keys it holds with Instance.publish and retract; the client side was missing. The argument is optional, so existing callers are unchanged. The SDK documentation has a new section on data-aware scheduling with the serving helper.
  • Data-aware scheduling breaks equal scores by attribute count, then idle time, then executor ID (#642, backport #646). Before, the das plugin broke equal scores, including every score of 0 when no executor holds the requested key, by the smaller executor ID, so work without a match always went to the same executor. For equal scores it now prefers the executor that publishes fewer attributes (the emptier cache, so work lands where it evicts the least), then the one that has been Idle the longest, then the smaller ID. A better match still wins; only ties change.
  • agent.open_session opens or creates a session with a caller-chosen id (#650, #651, backport #652). flamepy.agent.open_session(ssn_id=...) used to reopen an existing session only and failed with NOT_FOUND for a missing id. It now creates the session with the given image, min_instances, max_instances and resreq when it does not exist; an existing session keeps its own options. Calls without ssn_id are unchanged.

Release tooling:

  • hack/release.sh reads the flamepy version without color (#623, backport #629). This fixes the v0.7.0-rc1 publish failure (see "Release candidates").
  • flmadm install installs the wheel it just built (#626, backport #628). It ran uv pip install --find-links <wheels> flamepy, and uv skips pre-releases in favor of the latest stable release on PyPI, so with a release-candidate version it installed flamepy 0.6.0 (no flamepy.app or flamepy.agent) instead of the new wheel. Every end-to-end CI job on release-0.7 failed with ModuleNotFoundError: No module named 'flamepy.app' for this reason, and so would images and installs built through flmadm. It now empties its wheels directory, builds, and installs the one wheel by path.
  • The release check imports flamepy from the directory that holds it (#648, backport #649). hack/release.sh build-python put the root of its virtual environment on PYTHONPATH, where flamepy is not importable, so Publish flamepy failed for rc2. The check now uses the directory that contains the package.
  • verify-pypi bypasses uv's cached package index (#653, backport #654). After flamepy 0.7.0rc3 was uploaded, the workflow's check retried 30 times and reported the version as missing, which turned the run red although the package was on PyPI. The most likely cause is that uv reused a cached package index from before the upload; the install now passes --refresh. This is release tooling only; the packages are unchanged.

Upgrade Notes

  • Replace imports of the Runner API with flamepy.app, and uses of the tools sandbox with flamepy.agent (#537, #536).
  • Cache objects are created once and then only appended to: a put to an existing key fails with AlreadyExist, and there is no update (#586).
  • cache.advertise replaces cache.network_interface. Configs that still set network_interface keep loading (#587).
  • Session min_instances no longer starts a gang by itself; use batch_size for gangs (#599).
  • With the drf policy, a session may take free capacity beyond its fair share and is trimmed back only when another session needs it. Policies are configured as a list, for example drf with das.
  • Sandboxes of the built-in flmbox application have host networking (see above).
  • Executor attributes (#633) are not backward compatible with v0.7.0-rc1: the field attr of ExecutorAttributes is now publish, and retract is new, so the session manager, the executor manager and the SDKs must be upgraded together. An older session manager ignores retract and keeps the keys.
  • Sessions with batch_size above 1 and another min_instances or max_instances than the rule above are rejected when they are created (#636). A service declared with batch_size=N and no warmup (as examples/rl/search-r1 does) stays valid; with warmup, it must be 0 or N, and autoscale=False needs warmup=N.
  • Placement of sessions without affinity changes. The tie-break applies to every session that goes through the das plugin, including sessions that carry no affinity. They used to go to the smallest executor ID, which also kept a stateful service on the same executor; they now rotate across executors with equal attribute counts. A service that retains state in executors without publishing attributes, and relies on getting the same executor back, should publish a key for that state.
  • The Helm chart appVersion and image tags move to 0.7.0.