Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/flyte-binary-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: golangci/golangci-lint-action@v9
with:
working-directory: docker/devbox-bundled/bootstrap
version: v2.6.2
version: v2.12.2
- name: Check formatting
working-directory: docker/devbox-bundled/bootstrap
run: |
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Thank you for your interest in contributing to Flyte 2! This guide will help you

Before contributing, ensure you have:
- [Buf CLI](https://buf.build/docs/installation) installed
- Go 1.25.7 or later
- Go 1.26.3 or later
- Node.js and npm (for TypeScript)
- Python 3.10+ with `uv` package manager
- Rust toolchain (if working with Rust bindings)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Todo(alex): We should add UI into the image when UI is done

FROM --platform=${BUILDPLATFORM} golang:1.25-bookworm AS flytebuilder
FROM --platform=${BUILDPLATFORM} golang:1.26.3-bookworm AS flytebuilder

ARG TARGETARCH
ENV GOARCH="${TARGETARCH}"
Expand Down
177 changes: 90 additions & 87 deletions boilerplate/flyte/golang_support_tools/go.mod

Large diffs are not rendered by default.

400 changes: 188 additions & 212 deletions boilerplate/flyte/golang_support_tools/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion boilerplate/flyte/golang_test_targets/download_tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -e
# In the format of "<cli>:<package>" or ":<package>" if no cli
tools=(
"github.com/vektra/mockery/v3@v3.7.0"
"github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.2"
"github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2"
"github.com/daixiang0/gci"
"github.com/alvaroloes/enumer"
"github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
Expand Down
2 changes: 1 addition & 1 deletion docker/devbox-bundled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY images/manifest.txt images/preload ./
RUN ./preload manifest.txt


FROM --platform=${BUILDPLATFORM} golang:1.25-bookworm AS bootstrap
FROM --platform=${BUILDPLATFORM} golang:1.26.3-bookworm AS bootstrap

ARG TARGETARCH
ENV CGO_ENABLED 0
Expand Down
2 changes: 1 addition & 1 deletion docker/devbox-bundled/bootstrap/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/flyteorg/flyte/docker/devbox-bundled/bootstrap

go 1.24.0
go 1.26.3

require (
github.com/fergusstrange/embedded-postgres v1.34.0
Expand Down
4 changes: 2 additions & 2 deletions docs/BACKEND_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ flyte/
## Prerequisites

- [Buf CLI](https://buf.build/docs/installation) - Protocol buffer tooling
- Go 1.25.7 or later
- Go 1.26.3 or later
- Node.js/npm (for TypeScript generation)
- Python 3.9+ with `uv` package manager (for Python generation)
- Rust toolchain (for Rust generation)
Expand Down Expand Up @@ -152,7 +152,7 @@ The `gen/` directory contains auto-generated code and should not be manually edi

### Go Module Issues
- Run `make go-tidy` to clean up dependencies
- Ensure you're using Go 1.25.7 or later
- Ensure you're using Go 1.26.3 or later

### Python Generation Issues
- Ensure `uv` is installed: `pip install uv`
Expand Down
12 changes: 7 additions & 5 deletions docs/IMPLEMENTATION_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,6 @@ import (
"fmt"
"net/http"

"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

"github.com/flyteorg/flyte/v2/gen/go/flyteidl2/workflow/workflowconnect"
"github.com/flyteorg/flyte/v2/queue/service"
"github.com/flyteorg/flyte/v2/queue/repository"
Expand Down Expand Up @@ -933,9 +930,14 @@ func RunQueue(ctx context.Context) error {

// Setup HTTP/2 support
addr := fmt.Sprintf("%s:%d", cfg.Server.Host, cfg.Server.Port)
protocols := &http.Protocols{}
protocols.SetHTTP1(true)
protocols.SetUnencryptedHTTP2(true)

server := &http.Server{
Addr: addr,
Handler: h2c.NewHandler(mux, &http2.Server{}),
Addr: addr,
Handler: mux,
Protocols: protocols,
}

logger.Infof(ctx, "Starting Queue Service on %s", addr)
Expand Down
2 changes: 1 addition & 1 deletion executor/.github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v9
with:
version: v2.6.2
version: v2.12.2
12 changes: 6 additions & 6 deletions executor/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
This guide provides steps on how to develop and iterates changes.

## Prerequisites
- go version v1.24.0+
- go version v1.26.3+
- docker version 17.03+.
- kubectl version v1.11.3+.

### Setup on kind

We recommend using kind to create a Kubernetes cluster for local development.

### Use go v1.24
### Use go v1.26

Currently, flyte-v2 use go v1.24 for development.
Currently, flyte-v2 use go v1.26 for development.

```sh
go install golang.org/dl/go1.24.0@latest
go1.24.0 download
export GOROOT=$(go1.24.0 env GOROOT)
go install golang.org/dl/go1.26.3@latest
go1.26.3 download
export GOROOT=$(go1.26.3 env GOROOT)
export PATH="$GOROOT/bin:$PATH"
```

Expand Down
2 changes: 1 addition & 1 deletion executor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.25 AS builder
FROM golang:1.26.3 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
2 changes: 1 addition & 1 deletion executor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.19.0
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
GOLANGCI_LINT_VERSION ?= v2.6.2
GOLANGCI_LINT_VERSION ?= v2.12.2

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand Down
2 changes: 1 addition & 1 deletion executor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The executor uses conditions to track task progress:
## Getting Started

### Prerequisites
- go version v1.24.0+
- go version v1.26.3+
- docker version 17.03+.
- kubectl version v1.11.3+.
- Access to a Kubernetes v1.11.3+ cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type ErrorCollection struct {
func (e ErrorCollection) Error() string {
sb := strings.Builder{}
for idx, err := range e.Errors {
sb.WriteString(fmt.Sprintf("%v: %v\r\n", idx, err))
sb.WriteString(fmt.Sprintf("%v: %v\r\n", idx, err)) //nolint: staticcheck
}

return sb.String()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (i *EmbeddedSecretManagerInjector) addImagePullSecretToPod(
}

pod.Spec.ImagePullSecrets = append(pod.Spec.ImagePullSecrets, imagePullSecretRef)
slices2.SortStableFunc(pod.Spec.ImagePullSecrets, func(e corev1.LocalObjectReference, e2 corev1.LocalObjectReference) int {
slices2.SortStableFunc(pod.Spec.ImagePullSecrets, func(e corev1.LocalObjectReference, e2 corev1.LocalObjectReference) int { //nolint: govet
return strings.Compare(e.Name, e2.Name)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ErrorCollection struct {
func (e ErrorCollection) Error() string {
sb := strings.Builder{}
for idx, err := range e.Errors {
sb.WriteString(fmt.Sprintf("%v: %v\r\n", idx, err))
_, _ = fmt.Fprintf(&sb, "%v: %v\r\n", idx, err)
}

return sb.String()
Expand Down
23 changes: 13 additions & 10 deletions flytestdlib/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import (
"time"

"github.com/spf13/cobra"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

"github.com/flyteorg/flyte/v2/flytestdlib/config"
"github.com/flyteorg/flyte/v2/flytestdlib/config/viper"
Expand Down Expand Up @@ -118,8 +116,9 @@ func (a *App) serve(ctx context.Context) error {

addr := fmt.Sprintf("%s:%d", sc.Host, sc.Port)
server = &http.Server{
Addr: addr,
Handler: h2c.NewHandler(handler, &http2.Server{}),
Addr: addr,
Handler: handler,
Protocols: httpProtocols(),
}

wg.Add(1)
Expand Down Expand Up @@ -197,17 +196,21 @@ func (a *App) serve(ctx context.Context) error {
return shutdownErr
}

func httpProtocols() *http.Protocols {
protocols := &http.Protocols{}
protocols.SetHTTP1(true)
protocols.SetUnencryptedHTTP2(true)
return protocols
}

// requestGzipDecompressMiddleware pre-decompresses request bodies that carry
// Content-Encoding: gzip before they reach the connect-rpc handler.
//
// Some HTTP clients (e.g. pyqwest used by the Python connectrpc SDK) compress
// the request body at the application level and set Content-Encoding: gzip,
// but also use chunked transfer encoding for larger payloads. Go's h2c
// framing delivers the body in chunks, so by the time connect-go calls
// gzip.NewReader on the raw body stream the first bytes it receives may be a
// chunk-size line rather than the gzip magic bytes, causing "gzip: invalid
// header". Pre-reading and fully decompressing the body here, before h2c
// framing is involved, sidesteps the problem entirely.
// but also use chunked transfer encoding for larger payloads. Pre-reading and
// fully decompressing the body here keeps connect-go from seeing chunk framing
// bytes when it constructs its gzip reader.
func requestGzipDecompressMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if strings.EqualFold(r.Header.Get("Content-Encoding"), "gzip") {
Expand Down
2 changes: 1 addition & 1 deletion flytestdlib/cache/typed_marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (t *TypedMarshaler[T]) Get(ctx context.Context, key any) (T, error) {
// It returns a typed marshaler that can be used to marshal and unmarshal values of type T.
// If T is a pointer type, it will unmarshal into a new instance of T. Otherwise, it will unmarshal into a new instance of *T.
func NewTypedMarshaler[T any](marshaler *Marshaler) *TypedMarshaler[T] {
isPointerType := reflect.TypeOf(new(T)).Elem().Kind() == reflect.Ptr
isPointerType := reflect.TypeOf(new(T)).Elem().Kind() == reflect.Pointer
var elemType reflect.Type
if isPointerType {
elemType = reflect.TypeOf(new(T)).Elem().Elem()
Expand Down
6 changes: 3 additions & 3 deletions flytestdlib/config/config_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func printDocs(title string, isSubsection bool, section Section, visitedSection
for i := 0; i < val.Type().NumField(); i++ {
field := val.Type().Field(i)
tagType := field.Type
if tagType.Kind() == reflect.Ptr {
if tagType.Kind() == reflect.Pointer {
tagType = field.Type.Elem()
}

Expand All @@ -127,7 +127,7 @@ func printDocs(title string, isSubsection bool, section Section, visitedSection
subVal := val.Field(i)
if tagType.Kind() == reflect.Struct {
// In order to get value from unexported field in struct
if subVal.Kind() == reflect.Ptr {
if subVal.Kind() == reflect.Pointer {
subVal = reflect.NewAt(subVal.Type(), unsafe.Pointer(subVal.UnsafeAddr())).Elem()
} else {
subVal = reflect.NewAt(subVal.Type(), unsafe.Pointer(subVal.UnsafeAddr()))
Expand Down Expand Up @@ -240,7 +240,7 @@ func getDefaultValue(val interface{}) string {

func getFieldTypeString(tagType reflect.Type) string {
kind := tagType.Kind()
if kind == reflect.Ptr {
if kind == reflect.Pointer {
tagType = tagType.Elem()
kind = tagType.Kind()
}
Expand Down
4 changes: 2 additions & 2 deletions flytestdlib/config/section.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r *section) RegisterSectionWithUpdates(key SectionKey, configSection Confi
return nil, fmt.Errorf("configSection must be a non-nil pointer. SectionKey: %v", key)
}

if reflect.TypeOf(configSection).Kind() != reflect.Ptr {
if reflect.TypeOf(configSection).Kind() != reflect.Pointer {
return nil, fmt.Errorf("section must be a Pointer. SectionKey: %v", key)
}

Expand Down Expand Up @@ -199,7 +199,7 @@ func (r *section) SetConfig(c Config) error {
r.lockObj.Lock()
defer r.lockObj.Unlock()

if reflect.TypeOf(c).Kind() != reflect.Ptr {
if reflect.TypeOf(c).Kind() != reflect.Pointer {
return fmt.Errorf("config must be a Pointer")
}

Expand Down
2 changes: 1 addition & 1 deletion flytestdlib/config/viper/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (

var (
dereferencableKinds = map[reflect.Kind]struct{}{
reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {},
reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Pointer: {}, reflect.Slice: {},
}
)

Expand Down
2 changes: 1 addition & 1 deletion gen.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG TARGETARCH
ARG TARGETOS

# Set versions for all tools
ARG GO_VERSION=1.25.7
ARG GO_VERSION=1.26.3
ARG PYTHON_VERSION=3.12.9
ARG NODE_VERSION=20.18.3
ARG RUST_VERSION=1.85.0
Expand Down
2 changes: 1 addition & 1 deletion go.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
CMD_PATH ?= cmd/main.go
BIN_DIR ?= bin
BIN_NAME ?= $(SERVICE_NAME)
GOLANGCI_LINT_VERSION ?= v2.6.2
GOLANGCI_LINT_VERSION ?= v2.12.2
LOCALBIN ?= $(shell pwd)/bin

# ANSI color codes for prettier output
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/flyteorg/flyte/v2

go 1.25.7
go 1.26.3

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1
Expand Down Expand Up @@ -66,7 +66,6 @@ require (
go.opentelemetry.io/otel/sdk v1.37.0
go.opentelemetry.io/otel/trace v1.37.0
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9
golang.org/x/net v0.54.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0
golang.org/x/time v0.12.0
Expand Down Expand Up @@ -211,6 +210,7 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/sys v0.44.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion runs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.25.7-alpine AS builder
FROM golang:1.26.3-alpine AS builder

# Install dependencies
RUN apk add --no-cache git make build-base
Expand Down
2 changes: 1 addition & 1 deletion runs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Runs Service implements the `RunService` gRPC interface using buf connect. I

### Prerequisites

1. Go 1.24 or later
1. Go 1.26.3 or later
2. (Optional) PostgreSQL running for production use

### Quick Start with SQLite
Expand Down
Loading
Loading