Build function images with Nix instead of the up CLI #10
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
What problem are you facing?
The up CLI's Python function builder tars each function directory (following symlinks) and injects it into a base image. This works for simple functions but creates friction for a project of Modelplane's size:
- Shared library requires symlinks. The top-level
lib/directory is symlinked into each function directory so functions can import shared code. This is a workaround, not a feature. - No third-party packages. Functions are limited to the standard library and the function SDK. We store CRDs as JSON instead of YAML because we can't depend on
pyyaml. - Type checking in CI doesn't work. Function directories aren't Python packages on disk — they have no
__init__.pyorpyproject.toml, so type checkers like pyright and ty can't resolve relative imports. IDE-based type checking generally works, but we can't run type checks in CI.
How could Modelplane help solve your problem?
Once crossplane/cli#21 lands, switch to building function runtime images with Nix (or Docker) and passing them to the up CLI as pre-built images. The CLI would skip the build step and just add the Crossplane package metadata layer.
This lets us structure the project as a standard Python monorepo — a real package with pyproject.toml, dependencies declared in one place, shared library installed via normal packaging, type checking and test runners that work out of the box.
Blocked on crossplane/cli#21.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsIn Review
Activity
negz commentedon May 26, 2026
Done in #83.