Skip to content

Commit ebbe179

Browse files
authored
Merge branch 'v2' into dependabot/github_actions/actions/setup-go-6
2 parents bd0f2f1 + ed26ce3 commit ebbe179

File tree

24 files changed

+563
-1749
lines changed

24 files changed

+563
-1749
lines changed

.github/prompts/release.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/contributors.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Contributor Assistant
22

33
on:
44
pull_request_target:
5-
types: [opened, synchronize, reopened]
6-
check_run:
5+
types: [opened]
6+
check_suite:
77
types: [completed]
88

99
permissions:
@@ -12,14 +12,14 @@ permissions:
1212
checks: read
1313

1414
jobs:
15-
post-dco-comment:
15+
check-dco:
1616
runs-on: ubuntu-latest
17-
# Only run if triggered by PR events or if a check_run named "DCO" failed
17+
# Only run for PR opened events or when check suite completes with failure
1818
if: |
19-
github.event_name == 'pull_request_target' ||
20-
(github.event_name == 'check_run' &&
21-
github.event.check_run.name == 'DCO' &&
22-
github.event.check_run.conclusion == 'failure')
19+
github.event_name == 'pull_request_target' ||
20+
(github.event_name == 'check_suite' &&
21+
github.event.check_suite.conclusion == 'failure' &&
22+
github.event.check_suite.pull_requests[0] != null)
2323
steps:
2424
- name: Get Pull Request and Check DCO Status
2525
id: check_dco
@@ -28,16 +28,16 @@ jobs:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
script: |
3030
let prNumber;
31-
31+
3232
// Get PR number based on event type
3333
if (context.eventName === 'pull_request_target') {
3434
prNumber = context.issue.number;
35-
} else if (context.eventName === 'check_run') {
36-
const pulls = context.payload.check_run.pull_requests;
35+
} else if (context.eventName === 'check_suite') {
36+
const pulls = context.payload.check_suite.pull_requests;
3737
if (pulls && pulls.length > 0) {
3838
prNumber = pulls[0].number;
3939
} else {
40-
console.log('No PR associated with this check run');
40+
console.log('No PR associated with this check suite');
4141
return;
4242
}
4343
}

.github/workflows/integration-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ jobs:
5353
id: cache-key
5454
run: |
5555
# Create cache key from git commit and relevant source files
56-
key="flipt-$(git rev-parse --short HEAD)-$(find . -name '*.go' -o -name 'go.*' -o -name '*.json' | head -20 | sort | xargs sha256sum | sha256sum | cut -d' ' -f1 | head -c 8)"
56+
# Suppress SIGPIPE error from find when head closes the pipe early
57+
key="flipt-$(git rev-parse --short HEAD)-$(find . -name '*.go' -o -name 'go.*' -o -name '*.json' 2>/dev/null | head -20 | sort | xargs sha256sum | sha256sum | cut -d' ' -f1 | head -c 8)"
5758
echo "key=$key" >> $GITHUB_OUTPUT
5859
echo "Cache key: $key"
5960

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
uses: goreleaser/goreleaser-action@v6
6767
with:
6868
distribution: goreleaser-pro
69-
version: "~> v2.11.0"
69+
version: "~> v2.12"
7070
args: build --clean -f .goreleaser.${{ matrix.name }}.yml
7171
env:
7272
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
@@ -154,7 +154,7 @@ jobs:
154154
uses: goreleaser/goreleaser-action@v6
155155
with:
156156
distribution: goreleaser-pro
157-
version: "~> v2.11.0"
157+
version: "~> v2.12"
158158
args: release --clean
159159
env:
160160
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ _tools
7070
# AI generated files
7171
.claude*
7272
.cursor*
73+
74+
# Go workspace files
75+
go.work
76+
go.work.sum

.goreleaser.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ changelog:
7575
- title: "Other"
7676
order: 3
7777

78-
ai:
79-
use: anthropic
80-
prompt:
81-
from_file:
82-
path: .github/prompts/release.md
83-
8478
dockers:
8579
- dockerfile: ./build/Dockerfile
8680
use: buildx

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## [2.2.0](https://github.com/flipt-io/flipt/releases/tag/v2.2.0) - 2025-10-02
7+
8+
### Added
9+
10+
- **CLI license management**: New `flipt license` command with interactive TUI wizard for managing Flipt Pro licenses (#4767)
11+
- **Boolean evaluation**: Include segments in boolean flag evaluation response for consistency (#4767)
12+
13+
### Fixed
14+
15+
- **UI environment sync**: Refetch environments when window regains focus or network reconnects to ensure UI stays in sync (#4774)
16+
- **Git branch cleanup**: Remove deleted branches from UI when synced from Git repositories (#4770)
17+
- **Docker build**: Correct ARG declaration placement in Dockerfile to resolve build issues (#4772)
18+
- **OpenTelemetry compatibility**: Resolve schema URL conflicts and update to compatible exporter versions
19+
20+
### Changed
21+
22+
- **OpenTelemetry conventions**: Align event and attribute names with OpenTelemetry semantic conventions specification (#4769)
23+
24+
### Dependencies
25+
26+
- Updated various UI dependencies including @mui/material, @mui/x-charts, and development tools
27+
628
## [2.1.3](https://github.com/flipt-io/flipt/releases/tag/v2.1.3) - 2025-09-24
729

830
### Fixed

build/go.work.container

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
go 1.25.0
2+
3+
// This go.work file is used by the Dagger build container to enable
4+
// multi-module workspace support. It allows commands like
5+
// 'go run ./build/internal/cmd/gitea/...' to work correctly from the
6+
// main module directory by making all submodules part of the workspace.
7+
//
8+
// This file is copied to go.work in the container during the build process.
9+
10+
use (
11+
.
12+
./build
13+
./core
14+
./errors
15+
./rpc/flipt
16+
./rpc/v2/environments
17+
./rpc/v2/evaluation
18+
./sdk/go
19+
./sdk/go/v2
20+
)

build/internal/flipt.go

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
"github.com/containerd/platforms"
1010
"go.flipt.io/build/internal/dagger"
11-
"golang.org/x/mod/modfile"
1211
)
1312

1413
func Base(ctx context.Context, dag *dagger.Client, source, uiDist *dagger.Directory, platform platforms.Platform, registryCache ...string) (*dagger.Container, error) {
@@ -48,25 +47,26 @@ func Base(ctx context.Context, dag *dagger.Client, source, uiDist *dagger.Direct
4847
}
4948
}
5049

51-
goWork := source.File("go.work")
52-
work, err := goWork.Contents(ctx)
53-
if err != nil {
54-
return nil, err
55-
}
50+
// Mount the main module's go.mod and go.sum
51+
src := dag.Directory().
52+
WithFile("go.mod", source.File("go.mod")).
53+
WithFile("go.sum", source.File("go.sum"))
5654

57-
workFile, err := modfile.ParseWork("go.work", []byte(work), nil)
58-
if err != nil {
59-
return nil, err
55+
// Mount submodule dependency files for all modules with replace directives
56+
submodules := []string{
57+
"build",
58+
"core",
59+
"errors",
60+
"rpc/flipt",
61+
"rpc/v2/environments",
62+
"rpc/v2/evaluation",
63+
"sdk/go",
64+
"sdk/go/v2",
6065
}
6166

62-
// infer mod and sum files from the contents of the work file.
63-
src := dag.Directory().
64-
WithFile("go.work", goWork).
65-
WithFile("go.work.sum", source.File("go.work.sum"))
66-
67-
for _, use := range workFile.Use {
68-
mod := path.Join(use.Path, "go.mod")
69-
sum := path.Join(use.Path, "go.sum")
67+
for _, submodule := range submodules {
68+
mod := path.Join(submodule, "go.mod")
69+
sum := path.Join(submodule, "go.sum")
7070
src = src.
7171
WithFile(mod, source.File(mod)).
7272
WithFile(sum, source.File(sum))
@@ -98,6 +98,39 @@ func Base(ctx context.Context, dag *dagger.Client, source, uiDist *dagger.Direct
9898

9999
golang = golang.WithMountedDirectory(".", project)
100100

101+
// Create go.work file to enable multi-module support for tests
102+
// that run commands in submodules (e.g., go run ./build/internal/cmd/gitea/...)
103+
//
104+
// Note: We inline the content here rather than copying from build/go.work.container
105+
// to ensure it's always available regardless of mount ordering issues
106+
goWorkContent := `go 1.25.0
107+
108+
use (
109+
.
110+
./build
111+
./core
112+
./errors
113+
./rpc/flipt
114+
./rpc/v2/environments
115+
./rpc/v2/evaluation
116+
./sdk/go
117+
./sdk/go/v2
118+
)
119+
`
120+
golang = golang.WithNewFile("/src/go.work", goWorkContent, dagger.ContainerWithNewFileOpts{
121+
Permissions: 0644,
122+
})
123+
124+
// Sync the workspace to generate go.work.sum and validate the configuration
125+
golang = golang.WithExec([]string{"go", "work", "sync"})
126+
127+
// Download dependencies for ALL workspace modules (now that workspace is configured)
128+
// This ensures modules like 'build' have their dependencies available
129+
golang = golang.WithExec([]string{"go", "mod", "download"})
130+
if _, err := golang.Sync(ctx); err != nil {
131+
return nil, fmt.Errorf("downloading workspace dependencies: %w", err)
132+
}
133+
101134
// fetch and add ui/embed.go on its own
102135
embed := dag.Directory().WithFiles("./ui", []*dagger.File{
103136
source.File("./ui/dev.go"),

build/main.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,29 @@ func (f *Flipt) Test(
135135
WithExec([]string{"apk", "add", "--no-cache", "bash", "git"}).
136136
WithMountedDirectory("/src", source).
137137
WithWorkdir("/src")
138+
139+
// Setup Go workspace for test execution
140+
// This is needed for tests that run commands in submodules (e.g., go run ./build/internal/cmd/gitea/...)
141+
goWorkContent := `go 1.25.0
142+
143+
use (
144+
.
145+
./build
146+
./core
147+
./errors
148+
./rpc/flipt
149+
./rpc/v2/environments
150+
./rpc/v2/evaluation
151+
./sdk/go
152+
./sdk/go/v2
153+
)
154+
`
155+
f.BaseContainer = f.BaseContainer.
156+
WithNewFile("/src/go.work", goWorkContent, dagger.ContainerWithNewFileOpts{
157+
Permissions: 0644,
158+
}).
159+
WithExec([]string{"go", "work", "sync"}).
160+
WithExec([]string{"go", "mod", "download"})
138161
} else {
139162
// Fall back to normal build process
140163
flipt, err = f.Build(ctx, source, "", "")

0 commit comments

Comments
 (0)