Skip to content
Open
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/devbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
go-version: "1.27.1"
cache: true

# Exposes ACTIONS_RUNTIME_TOKEN so the Makefile's type=gha buildx cache works.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flyte-binary-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: golangci/golangci-lint-action@v9
with:
working-directory: docker/devbox-bundled/bootstrap
version: v2.12.2
version: v2.13.2
- name: Check formatting
working-directory: docker/devbox-bundled/bootstrap
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
go-version: "1.27.1"
cache: true

- name: Cache embedded postgres
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.26.5 or later
- Go 1.27.1 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.26.6-bookworm AS flytebuilder
FROM --platform=${BUILDPLATFORM} golang:1.27.1-bookworm AS flytebuilder

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

Large diffs are not rendered by default.

267 changes: 136 additions & 131 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.12.2"
"github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.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 @@ -12,7 +12,7 @@ ARG CACHEBUST=0
RUN echo "cachebust=${CACHEBUST}" && ./preload manifest.txt


FROM --platform=${BUILDPLATFORM} golang:1.26.5-bookworm AS bootstrap
FROM --platform=${BUILDPLATFORM} golang:1.27.1-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.26.5
go 1.27.1

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.26.5 or later
- Go 1.27.1 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.26.5 or later
- Ensure you're using Go 1.27.1 or later

### Python Generation Issues
- Ensure `uv` is installed: `pip install uv`
Expand Down
3 changes: 1 addition & 2 deletions executor/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Kubebuilder DevContainer",
"image": "golang:1.25",
"image": "golang:1.27.1",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {}
Expand All @@ -22,4 +22,3 @@

"onCreateCommand": "bash .devcontainer/post-install.sh"
}

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.12.2
version: v2.13.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.26.5+
- go version v1.27.1+
- 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.26
### Use Go v1.27

Currently, flyte-v2 use go v1.26 for development.
Currently, Flyte v2 uses Go v1.27 for development.

```sh
go install golang.org/dl/go1.26.5@latest
go1.26.5 download
export GOROOT=$(go1.26.5 env GOROOT)
go install golang.org/dl/go1.27.1@latest
go1.27.1 download
export GOROOT=$(go1.27.1 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.26.5 AS builder
FROM golang:1.27.1 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.12.2
GOLANGCI_LINT_VERSION ?= v2.13.2

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand Down
3 changes: 1 addition & 2 deletions 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.26.5+
- go version v1.27.1+
- docker version 17.03+.
- kubectl version v1.11.3+.
- Access to a Kubernetes v1.11.3+ cluster.
Expand Down Expand Up @@ -147,4 +147,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func newSecretsInjector(
return nil, fmt.Errorf("failed to create cache factory: %w", err)
}

secretCache, err := stdlibCache.New[SecretValue]("secret_cache", cacheConfig.Type, cacheFactory, nil, scope.NewSubScope("secret_value"))
secretCache, err := cacheFactory.New[SecretValue]("secret_cache", cacheConfig.Type, nil, scope.NewSubScope("secret_value"))
if err != nil {
logger.Errorf(ctx, "Failed to create secret cache: %v", err)
return nil, fmt.Errorf("failed to create secret cache: %w", err)
Expand Down
98 changes: 46 additions & 52 deletions flyteplugins/go/tasks/pluginmachinery/tasklog/azure_plugin_test.go
Original file line number Diff line number Diff line change
@@ -1,67 +1,61 @@
package tasklog

import (
"reflect"
"bytes"
"compress/gzip"
"encoding/base64"
"io"
"net/url"
"strings"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/flyteorg/flyte/v2/gen/go/flyteidl2/core"
)

func TestAzureTemplateLogPlugin(t *testing.T) {
type args struct {

@Sovietaced Sovietaced Sep 2, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Go 1.27 changed the compress/flate implementation, so gzip output can produce different—but equally valid—compressed bytes.
The Azure test previously asserted the entire generated URL, including a hard-coded base64-encoded gzip payload. After upgrading Go, that byte-for-byte value changed even though the decompressed Azure query was identical.
I changed this to verify the meaningful behavior:

  1. Check the Azure URL prefix and log metadata.
  2. URL-decode the query.
  3. Base64-decode it.
  4. Gzip-decompress it.
  5. Compare the resulting query text with the expected query.
    So it was a test-stability adjustment required by Go 1.27’s compression change, not a production behavior change. It also avoids future failures when compression output changes without changing its contents.

input Input
}
tests := []struct {
name string
plugin AzureLogsTemplatePlugin
args args
want Output
}{
{
"test azure template log plugin",
AzureLogsTemplatePlugin{
TemplateLogPlugin: TemplateLogPlugin{
Name: "Azure Logs",
DisplayName: "Azure Logs",
TemplateURIs: []TemplateURI{"https://portal.azure.com#@test-tenantID/blade/Microsoft_OperationsManagementSuite_Workspace/Logs.ReactView/resourceId/%%2Fsubscriptions%%2Ftest-subscriptionID%%2FresourceGroups%%2Ftest-resourceGroupName/source/LogsBlade.AnalyticsShareLinkToQuery/q/"},
},
},
args{
input: Input{
HostName: "test-host",
PodName: "test-pod",
Namespace: "test-namespace",
ContainerName: "test-container",
ContainerID: "test-containerID",
LogName: "main_logs",
PodRFC3339StartTime: "1970-01-01T01:02:03+01:00",
PodRFC3339FinishTime: "1970-01-01T04:25:45+01:00",
PodUnixStartTime: 123,
PodUnixFinishTime: 12345,
TaskExecutionID: dummyTaskExecID(),
},
},
Output{
TaskLogs: []*core.TaskLog{
{
Name: "Azure Logsmain_logs",
Uri: "https://portal.azure.com#@test-tenantID/blade/Microsoft_OperationsManagementSuite_Workspace/Logs.ReactView/resourceId/%%2Fsubscriptions%%2Ftest-subscriptionID%%2FresourceGroups%%2Ftest-resourceGroupName/source/LogsBlade.AnalyticsShareLinkToQuery/q/H4sIAAAAAAAA%2F3yPwUrFMBBF9%2F2KIZvX4ktJaosY6UrQjYhgcStjM9iATUo60o0fL0Fa24XuhnsuhzsfxPDMGLlzI0ELFpnYjfSK1uanIXzG0xmkPm8gF%2Fr6SkmlpdKd0kZVRl1epEOJorjJkvDOeTcP%2Fxn%2FFNamakzd7IS3wTM6T%2FEhvL9U2RcsA0WCZL8nTxGZLLwRL0Qe8t9fynK3o8gAvYXN9YhpWwuCaWbZr7H4qT0FeyxMwR7RPGG%2F436NxHcAAAD%2F%2F4NTt6FQAQAA",
MessageFormat: core.TaskLog_JSON,
},
},
},
const baseURI = "https://portal.azure.com#@test-tenantID/blade/Microsoft_OperationsManagementSuite_Workspace/Logs.ReactView/resourceId/%%2Fsubscriptions%%2Ftest-subscriptionID%%2FresourceGroups%%2Ftest-resourceGroupName/source/LogsBlade.AnalyticsShareLinkToQuery/q/"

plugin := AzureLogsTemplatePlugin{
TemplateLogPlugin: TemplateLogPlugin{
Name: "Azure Logs",
DisplayName: "Azure Logs",
TemplateURIs: []TemplateURI{baseURI},
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := tt.plugin.GetTaskLogs(tt.args.input)
assert.NoError(t, err)
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("GetTaskLogs() got = %v, want %v", got, tt.want)
}
})
input := Input{
HostName: "test-host",
PodName: "test-pod",
Namespace: "test-namespace",
ContainerName: "test-container",
ContainerID: "test-containerID",
LogName: "main_logs",
PodRFC3339StartTime: "1970-01-01T01:02:03+01:00",
PodRFC3339FinishTime: "1970-01-01T04:25:45+01:00",
PodUnixStartTime: 123,
PodUnixFinishTime: 12345,
TaskExecutionID: dummyTaskExecID(),
}

got, err := plugin.GetTaskLogs(input)
require.NoError(t, err)
require.Len(t, got.TaskLogs, 1)
assert.Equal(t, "Azure Logsmain_logs", got.TaskLogs[0].Name)
assert.Equal(t, core.TaskLog_JSON, got.TaskLogs[0].MessageFormat)
require.True(t, strings.HasPrefix(got.TaskLogs[0].Uri, baseURI))

encodedQuery := strings.TrimPrefix(got.TaskLogs[0].Uri, baseURI)
base64Query, err := url.QueryUnescape(encodedQuery)
require.NoError(t, err)
compressedQuery, err := base64.StdEncoding.DecodeString(base64Query)
require.NoError(t, err)
gzipReader, err := gzip.NewReader(bytes.NewReader(compressedQuery))
require.NoError(t, err)
query, err := io.ReadAll(gzipReader)
require.NoError(t, err)
require.NoError(t, gzipReader.Close())

assert.Equal(t, replaceAll(defaulQueryFormat, input.templateVars()), string(query))
}
2 changes: 1 addition & 1 deletion flytestdlib/cache/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewFactory(ctx context.Context, c *Config, secretManager SecretManager, sco
}

// New creates a new cache with the given name and load function.
func New[T any](name string, cacheType Type, f Factory, loadFunc cache.LoadFunction[T], scope promutils.Scope) (cache.CacheInterface[T], error) {
func (f Factory) New[T any](name string, cacheType Type, loadFunc cache.LoadFunction[T], scope promutils.Scope) (cache.CacheInterface[T], error) {
scope = scope.NewSubScope(name)
var cacheManager cache.CacheInterface[any]
inMemoryStoreCache := cache.New[any](f.inMemoryCache)
Expand Down
53 changes: 30 additions & 23 deletions flytestdlib/futures/future_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package futures
import (
"context"
"fmt"
"runtime"
"testing"
"testing/synctest"
"time"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -66,32 +66,39 @@ func TestAsyncFuture(t *testing.T) {
})

t.Run("wait-return-val", func(t *testing.T) {
v := val
err := fmt.Errorf("err")
af := NewAsyncFuture(context.TODO(), func(ctx context.Context) (interface{}, error) {
time.Sleep(time.Second * 1)
return v, err
synctest.Test(t, func(t *testing.T) {
v := val
err := fmt.Errorf("err")
af := NewAsyncFuture(t.Context(), func(ctx context.Context) (interface{}, error) {
time.Sleep(time.Second)
return v, err
})
assert.NotNil(t, af)
rv, rerr := af.Get(t.Context())
assert.Equal(t, v, rv)
assert.Equal(t, err, rerr)
assert.True(t, af.Ready())
})
runtime.Gosched()
assert.NotNil(t, af)
rv, rerr := af.Get(context.TODO())
assert.Equal(t, v, rv)
assert.Equal(t, err, rerr)
assert.True(t, af.Ready())
})

t.Run("timeout", func(t *testing.T) {
v := val
ctx := context.TODO()
af := NewAsyncFuture(ctx, func(ctx context.Context) (interface{}, error) {
time.Sleep(time.Second * 5)
return v, nil
synctest.Test(t, func(t *testing.T) {
v := val
af := NewAsyncFuture(t.Context(), func(ctx context.Context) (interface{}, error) {
select {
case <-time.After(5 * time.Second):
return v, nil
case <-ctx.Done():
return nil, ctx.Err()
}
})
synctest.Wait()
cctx, cancel := context.WithCancel(t.Context())
cancel()
_, rerr := af.Get(cctx)
assert.Error(t, rerr)
assert.Equal(t, ErrAsyncFutureCanceled, rerr)
synctest.Wait()
})
runtime.Gosched()
cctx, cancel := context.WithCancel(ctx)
cancel()
_, rerr := af.Get(cctx)
assert.Error(t, rerr)
assert.Equal(t, ErrAsyncFutureCanceled, rerr)
})
}
Loading
Loading