Thank you for your interest in contributing to Flyte 2! This guide will help you understand the contribution workflow, testing requirements, and release process.
- Getting Started
- Development Workflow
- Making Changes
- Testing and Verification
- Submitting Changes
- Release Process
- Best Practices
Before contributing, ensure you have:
- Buf CLI installed
- Go 1.25.7 or later
- Node.js and npm (for TypeScript)
- Python 3.10+ with
uvpackage manager - Rust toolchain (if working with Rust bindings)
- Git configured with your name and email
- Docker (for building and running the devbox image)
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/flyte.git cd flyte/flyte -
Add upstream remote:
git remote add upstream https://github.com/flyteorg/flyte.git
-
Verify your setup:
make docker-pull # Pull the docker image for generation make gen
The fastest way to run a full Flyte stack on your machine is the bundled devbox — a k3d-based Kubernetes cluster with all dependencies (TaskAction CRD, Knative, PostgreSQL, etc.) pre-installed — combined with a locally-running flyte-manager binary.
From the repo root:
# Build the devbox image (first time only, or after Dockerfile changes)
make devbox-build
# Start the devbox cluster in dev mode (required for running the manager locally)
make devbox-run FLYTE_DEV=true
# Stop the devbox when you're done
make devbox-stopFLYTE_DEV=true is required when you intend to run the manager locally — it disables the in-cluster manager so your local process can take over. make devbox-run writes a kubeconfig pointing at the devbox cluster in global kubeconfig, so kubectl will target it automatically.
With the devbox running, start the manager locally:
# From the repo root
make -C manager run
# Or from manager/
make run
# Or build and run the binary directly
cd manager
make build
./bin/flyte-manager --config config.yamlThe manager will:
- Connect to PostgreSQL and run database migrations
- Start all services in parallel goroutines
- Connect to your Kubernetes cluster
- Begin reconciling TaskAction CRs
Edit manager/config.yaml:
manager:
# Single server port hosting all Connect services (Runs, Actions, DataProxy, Events, Cache, Secret, App).
server:
host: "0.0.0.0"
port: 8090
executor:
healthProbePort: 8081
kubernetes:
namespace: "flyte"
# Optional: specify custom kubeconfig path
# kubeconfig: "/path/to/kubeconfig"
runs:
storagePrefix: "s3://flyte-data"
database:
postgres:
host: "localhost"
port: 30001
dbname: "runs"
username: "postgres"
password: "postgres"
options: "sslmode=disable"
logger:
level: 4 # Info level
show-source: trueSee manager/README.md for the full architecture, API endpoints, and troubleshooting tips.
Always create a new branch for your changes:
git checkout -b feature/your-feature-nameUse descriptive branch names:
feature/add-new-task-type- for new featuresfix/workflow-literal-bug- for bug fixesdocs/improve-readme- for documentationrefactor/simplify-interface- for refactoring
Regularly sync with upstream:
git fetch upstream
git rebase upstream/v2When editing .proto files in flyteidl2/:
Naming Conventions:
- Use
snake_casefor field names:task_id,execution_time - Use
PascalCasefor message names:TaskDefinition,WorkflowSpec - Use
SCREAMING_SNAKE_CASEfor enum values:TASK_STATE_RUNNING
Backward Compatibility:
- Never change field numbers
- Never change field types
- Never remove required fields
- Use
reservedfor removed fields:message Example { reserved 2, 15, 9 to 11; reserved "old_field_name"; }
Documentation:
- Add clear comments for all messages, fields, and enums
- Include examples where helpful
- Document any constraints or validation rules
Example:
// TaskDefinition defines the structure and configuration of a task.
message TaskDefinition {
// Unique identifier for the task
string task_id = 1;
// Human-readable name for the task
string name = 2;
// Optional description explaining the task's purpose
string description = 3;
}After making changes:
# Format proto files
make buf-format
# Lint proto files
make buf-lint
# Generate all language bindings
make bufIf you need to customize generation for a specific language, update files in flyteidl2/gen_utils/:
flyteidl2/gen_utils/go/- Go-specific utilitiesflyteidl2/gen_utils/ts/- TypeScript utilitiesflyteidl2/gen_utils/python/- Python package configurationflyteidl2/gen_utils/rust/- Rust crate configuration
make buf-lint
make buf-formatAll proto files must pass linting without errors.
Go:
make buf-go
make go-tidy
cd gen/go
go build ./...
go test ./...TypeScript:
make buf-ts
cd gen/ts
npm install
npm run build # if there's a build scriptPython:
make buf-python
cd gen/python
uv lock
uv syncRust:
make buf-rust
make build-crateIf you've modified Go interfaces:
make mocksTest your changes in a downstream project that uses flyte:
- Use
replacedirective ingo.modto point to your local changes - Generate code and verify it works as expected
- Run integration tests in the consuming project
Write clear, descriptive commit messages:
git add .
git commit -s -m "feat: add new task execution state
- Add TASK_STATE_CACHED for cached task results
- Update state transitions to support caching
- Add documentation for caching behavior
Fixes #123"Commit message format:
- Use conventional commits:
feat:,fix:,docs:,refactor:,test: - Include
-sflag to sign your commits (required) - Reference issue numbers with
Fixes #123orCloses #456
git push origin feature/your-feature-name- Go to the Flyte repository
- Click "New Pull Request"
- Select your fork and branch
- Target the
v2branch (notmain) - Fill out the PR template with:
- Description of changes
- Motivation and context
- Testing performed
- Screenshots (if UI changes)
- Breaking changes (if any)
- Address reviewer feedback promptly
- Push new commits to the same branch
- Use
git commit --amendfor small fixes (thengit push --force) - Engage in constructive discussion
- Be patient - reviews may take time
Releases are created by maintainers following these steps:
Flyte 2 follows Semantic Versioning 2.0.0:
- MAJOR version (v2.0.0 → v3.0.0): Breaking changes
- MINOR version (v2.1.0 → v2.2.0): New features, backward compatible
- PATCH version (v2.1.1 → v2.1.2): Bug fixes, backward compatible
-
Ensure all changes are merged into
v2branch -
Determine the version number based on changes:
# View changes since last release git log v2.X.Y..HEAD --oneline -
Create and push a tag:
git checkout v2 git pull upstream v2 git tag -a v2.X.Y -m "Release v2.X.Y" git push upstream v2.X.Y -
Create GitHub Release:
- Go to Releases
- Click "Draft a new release"
- Select the tag you just created
- Generate release notes
- Add any additional context or highlights
- Publish release
-
Verify Artifacts: The release triggers automated publishing to:
- Go modules:
github.com/flyteorg/flyte/v2 - NPM:
@flyteorg/flyte - PyPI:
flyteidl2 - Crates.io:
flyte
- Go modules:
-
Verify published packages:
# Go GOPROXY=https://proxy.golang.org go list -m github.com/flyteorg/flyte/v2@v2.X.Y # NPM npm view @flyteorg/flyte@2.X.Y # PyPI pip index versions flyteidl2 # Crates.io cargo search flyte
-
Update dependent projects with the new version
-
Announce the release in community channels
- Keep messages small and focused - Single responsibility principle
- Use oneof for mutually exclusive fields:
message Task { oneof task_type { PythonTask python = 1; ContainerTask container = 2; } }
- Use optional for truly optional fields (proto3)
- Use repeated for arrays/lists
- Provide sensible defaults where appropriate
- Document all public APIs
- Include usage examples in comments
- Keep README.md and CONTRIBUTING.md up to date
- Add inline comments for complex logic
- Commit early and often
- Keep commits atomic and focused
- Write meaningful commit messages
- Squash small "fix" commits before PR
- Rebase instead of merge when updating your branch
- Be respectful and professional
- Ask questions when unclear
- Provide context in discussions
- Update PR descriptions as scope changes
- Respond to reviews in a timely manner
- Documentation: Flyte Documentation
- Community Slack: Flyte Slack
- GitHub Issues: Report Issues
- GitHub Discussions: Ask Questions
By contributing to Flyte 2, you agree that your contributions will be licensed under the Apache License 2.0.