Skip to content

Commit 5cd8a64

Browse files
committed
Merge branch 'main' into fix-remove-stale-reviewrequests
2 parents 86dde82 + 6619b1e commit 5cd8a64

File tree

18 files changed

+669
-425
lines changed

18 files changed

+669
-425
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.24.x
26+
XGO_VERSION := go-1.25.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,53 @@
1515
with pkgs;
1616
let
1717
# only bump toolchain versions here
18-
go = go_1_24;
18+
go = go_1_25;
1919
nodejs = nodejs_24;
2020
python3 = python312;
21+
22+
# Platform-specific dependencies
23+
linuxOnlyInputs = lib.optionals pkgs.stdenv.isLinux [
24+
glibc.static
25+
];
26+
27+
linuxOnlyEnv = lib.optionalAttrs pkgs.stdenv.isLinux {
28+
CFLAGS = "-I${glibc.static.dev}/include";
29+
LDFLAGS = "-L ${glibc.static}/lib";
30+
};
2131
in
22-
pkgs.mkShell {
23-
buildInputs = [
24-
# generic
25-
git
26-
git-lfs
27-
gnumake
28-
gnused
29-
gnutar
30-
gzip
32+
pkgs.mkShell (
33+
{
34+
buildInputs = [
35+
# generic
36+
git
37+
git-lfs
38+
gnumake
39+
gnused
40+
gnutar
41+
gzip
3142

32-
# frontend
33-
nodejs
43+
# frontend
44+
nodejs
3445

35-
# linting
36-
python3
37-
uv
46+
# linting
47+
python3
48+
uv
3849

39-
# backend
40-
go
41-
glibc.static
42-
gofumpt
43-
sqlite
44-
];
45-
CFLAGS = "-I${glibc.static.dev}/include";
46-
LDFLAGS = "-L ${glibc.static}/lib";
47-
GO = "${go}/bin/go";
48-
GOROOT = "${go}/share/go";
50+
# backend
51+
go
52+
gofumpt
53+
sqlite
54+
]
55+
++ linuxOnlyInputs;
56+
57+
GO = "${go}/bin/go";
58+
GOROOT = "${go}/share/go";
4959

50-
TAGS = "sqlite sqlite_unlock_notify";
51-
STATIC = "true";
52-
};
60+
TAGS = "sqlite sqlite_unlock_notify";
61+
STATIC = "true";
62+
}
63+
// linuxOnlyEnv
64+
);
5365
}
5466
);
5567
}

modules/setting/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424
ZombieTaskTimeout time.Duration `ini:"ZOMBIE_TASK_TIMEOUT"`
2525
EndlessTaskTimeout time.Duration `ini:"ENDLESS_TASK_TIMEOUT"`
2626
AbandonedJobTimeout time.Duration `ini:"ABANDONED_JOB_TIMEOUT"`
27-
SkipWorkflowStrings []string `ìni:"SKIP_WORKFLOW_STRINGS"`
27+
SkipWorkflowStrings []string `ini:"SKIP_WORKFLOW_STRINGS"`
2828
}{
2929
Enabled: true,
3030
DefaultActionsURL: defaultActionsURLGitHub,

modules/setting/cron_test.go

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,56 @@ EXTEND = true
4141
assert.Equal(t, "white rabbit", extended.Second)
4242
assert.True(t, extended.Extend)
4343
}
44+
45+
// Test_getCronSettings2 tests that getCronSettings can not handle two levels of embedding
46+
func Test_getCronSettings2(t *testing.T) {
47+
type BaseStruct struct {
48+
Enabled bool
49+
RunAtStart bool
50+
Schedule string
51+
}
52+
53+
type Extended struct {
54+
BaseStruct
55+
Extend bool
56+
}
57+
type Extended2 struct {
58+
Extended
59+
Third string
60+
}
61+
62+
iniStr := `
63+
[cron.test]
64+
ENABLED = TRUE
65+
RUN_AT_START = TRUE
66+
SCHEDULE = @every 1h
67+
EXTEND = true
68+
THIRD = white rabbit
69+
`
70+
cfg, err := NewConfigProviderFromData(iniStr)
71+
assert.NoError(t, err)
72+
73+
extended := &Extended2{
74+
Extended: Extended{
75+
BaseStruct: BaseStruct{
76+
Enabled: false,
77+
RunAtStart: false,
78+
Schedule: "@every 72h",
79+
},
80+
Extend: false,
81+
},
82+
Third: "black rabbit",
83+
}
84+
85+
_, err = getCronSettings(cfg, "test", extended)
86+
assert.NoError(t, err)
87+
88+
// This confirms the first level of embedding works
89+
assert.Equal(t, "white rabbit", extended.Third)
90+
assert.True(t, extended.Extend)
91+
92+
// This confirms 2 levels of embedding doesn't work
93+
assert.False(t, extended.Enabled)
94+
assert.False(t, extended.RunAtStart)
95+
assert.Equal(t, "@every 72h", extended.Schedule)
96+
}

0 commit comments

Comments
 (0)