Skip to content

Commit b2020b9

Browse files
authored
2025-11-25T11:25:34+0800 (#952)
* 2025-11-25T11:25:34+0800 * 2025-11-25T11:25:34+0800 * 2025-11-25T11:25:34+0800 * 2025-11-25T11:25:34+0800 * 2025-11-25T11:25:34+0800 * 2025-11-25T11:25:34+0800
1 parent c36e7f2 commit b2020b9

File tree

108 files changed

+6400
-3447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+6400
-3447
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
KUSCIA_VERSION = 1.0.0b0
1+
KUSCIA_VERSION = 1.1.0b0
22
SECRETFLOW_VERSION = 1.11.0b1

.github/workflows/dependency-review.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ jobs:
3939
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040
- name: 'Dependency Review'
4141
uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8 # v4
42+
with:
43+
warn-only: true
44+
fail-on-severity: critical

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
cache: true
5353
- name: Install specific version of golangci-lint
5454
run: |
55-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
55+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
5656
golangci-lint --version
5757
- name: Install codespell
5858
run: |
@@ -64,5 +64,5 @@ jobs:
6464
else
6565
LAST_COMMIT_SHA=${{ github.event.pull_request.base.sha }}
6666
fi
67-
golangci-lint run --new-from-rev=${LAST_COMMIT_SHA} --out-format=colored-line-number --timeout=5m
67+
golangci-lint run --new-from-rev=${LAST_COMMIT_SHA} --timeout=5m
6868
make codespell-check

.golangci.yml

Lines changed: 110 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# This file contains all available configuration options
1818
# with their default values.
1919

20+
version: 2
2021
# options for analysis running
2122
run:
2223
# default concurrency is a available CPU number
@@ -36,8 +37,6 @@ run:
3637

3738
# output configuration options
3839
output:
39-
# sort linter result
40-
sort-results: true
4140
# sort order
4241
sort-order:
4342
- linter
@@ -46,111 +45,22 @@ output:
4645

4746
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
4847
formats:
49-
- format: json
48+
json:
5049
path: stderr
5150

52-
# print lines of code with issue, default is true
53-
print-issued-lines: true
54-
55-
# print linter name in the end of issue text, default is true
56-
print-linter-name: true
57-
5851
issues:
5952
max-same-issues: 0
6053
max-issues-per-linter: 0
61-
exclude-files:
62-
- _test\.go
63-
- cmd/example
64-
- webdemo/
65-
66-
# all available settings of specific linters
67-
linters-settings:
68-
revive:
69-
rules:
70-
- name: unused-parameter # disable unused-parameter rule
71-
disabled: true
72-
errcheck:
73-
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
74-
# default is false: such cases aren't reported by default.
75-
check-type-assertions: false
76-
77-
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
78-
# default is false: such cases aren't reported by default.
79-
check-blank: false
80-
govet:
81-
# report about shadowed variables
82-
enable:
83-
- shadow
84-
gofmt:
85-
# simplify code: gofmt with `-s` option, true by default
86-
simplify: true
87-
goimports:
88-
# put imports beginning with prefix after 3rd-party packages;
89-
# it's a comma-separated list of prefixes
90-
local-prefixes: github.com/secretflow/kuscia
91-
gocyclo:
92-
# minimal code complexity to report, 30 by default (but we recommend 10-20)
93-
min-complexity: 10
94-
dupl:
95-
# tokens count to trigger issue, 150 by default
96-
threshold: 150
97-
goconst:
98-
# minimal length of string constant, 3 by default
99-
min-len: 3
100-
# minimal occurrences count to trigger, 3 by default
101-
min-occurrences: 3
102-
depguard:
103-
rules:
104-
main:
105-
deny:
106-
- pkg: "github.com/davecgh/go-spew/spew"
107-
misspell:
108-
# Correct spellings using locale preferences for US or UK.
109-
# Default is to use a neutral variety of English.
110-
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
111-
locale: US
112-
ignore-words:
113-
- someword
114-
lll:
115-
# max line length, lines longer will be reported. Default is 120.
116-
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
117-
line-length: 120
118-
# tab width in spaces. Default to 1.
119-
tab-width: 1
120-
unused:
121-
parameters-are-used: true
122-
exported-fields-are-used: true
123-
unparam:
124-
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
125-
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
126-
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
127-
# with golangci-lint call it on a directory with the changed file.
128-
check-exported: false
129-
nakedret:
130-
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
131-
max-func-lines: 30
132-
prealloc:
133-
# XXX: we don't recommend using this linter before doing performance profiling.
134-
# For most programs usage of prealloc will be a premature optimization.
135-
136-
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
137-
# True by default.
138-
simple: true
139-
range-loops: true # Report preallocation suggestions on range loops, true by default
140-
for-loops: false # Report preallocation suggestions on for loops, false by default
141-
gocritic:
142-
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
143-
disabled-checks:
144-
- regexpMust
145-
146-
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
147-
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
148-
enabled-tags:
149-
- performance
150-
151-
settings: # settings passed to gocritic
152-
captLocal: # must be valid enabled check name
153-
paramsOnly: true
54+
55+
formatters:
56+
settings:
57+
gofmt:
58+
# simplify code: gofmt with `-s` option, true by default
59+
simplify: true
60+
goimports:
61+
# put imports beginning with prefix after 3rd-party packages;
62+
# it's a comma-separated list of prefixes
63+
local-prefixes: github.com/secretflow/kuscia
15464

15565
linters:
15666
enable:
@@ -160,6 +70,101 @@ linters:
16070
- errcheck
16171
- goconst
16272
- dupl
163-
- goimports
164-
disable-all: true
165-
fast: false
73+
disable:
74+
- ineffassign
75+
- staticcheck
76+
exclusions:
77+
rules:
78+
- source: Close
79+
linters:
80+
- errcheck
81+
paths:
82+
- _test\.go
83+
- cmd/example
84+
- webdemo/.*
85+
- pkg/datamesh/dataserver/io/builtin/.*
86+
# all available settings of specific linters
87+
settings:
88+
revive:
89+
rules:
90+
- name: unused-parameter # disable unused-parameter rule
91+
disabled: true
92+
errcheck:
93+
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
94+
# default is false: such cases aren't reported by default.
95+
check-type-assertions: false
96+
97+
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
98+
# default is false: such cases aren't reported by default.
99+
check-blank: false
100+
exclude-functions:
101+
- os.Remove
102+
- os.RemoveAll
103+
govet:
104+
# report about shadowed variables
105+
enable:
106+
- shadow
107+
gocyclo:
108+
# minimal code complexity to report, 30 by default (but we recommend 10-20)
109+
min-complexity: 10
110+
dupl:
111+
# tokens count to trigger issue, 150 by default
112+
threshold: 150
113+
goconst:
114+
# minimal length of string constant, 3 by default
115+
min-len: 3
116+
# minimal occurrences count to trigger, 3 by default
117+
min-occurrences: 3
118+
depguard:
119+
rules:
120+
main:
121+
deny:
122+
- pkg: "github.com/davecgh/go-spew/spew"
123+
misspell:
124+
# Correct spellings using locale preferences for US or UK.
125+
# Default is to use a neutral variety of English.
126+
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
127+
locale: US
128+
ignore-rules:
129+
- someword
130+
lll:
131+
# max line length, lines longer will be reported. Default is 120.
132+
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
133+
line-length: 120
134+
# tab width in spaces. Default to 1.
135+
tab-width: 1
136+
unused:
137+
parameters-are-used: true
138+
exported-fields-are-used: true
139+
unparam:
140+
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
141+
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
142+
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
143+
# with golangci-lint call it on a directory with the changed file.
144+
check-exported: false
145+
nakedret:
146+
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
147+
max-func-lines: 30
148+
prealloc:
149+
# XXX: we don't recommend using this linter before doing performance profiling.
150+
# For most programs usage of prealloc will be a premature optimization.
151+
152+
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
153+
# True by default.
154+
simple: true
155+
range-loops: true # Report preallocation suggestions on range loops, true by default
156+
for-loops: false # Report preallocation suggestions on for loops, false by default
157+
gocritic:
158+
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
159+
disabled-checks:
160+
- regexpMust
161+
162+
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
163+
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
164+
enabled-tags:
165+
- performance
166+
167+
settings: # settings passed to gocritic
168+
captLocal: # must be valid enabled check name
169+
paramsOnly: true
170+

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
module(
1616
name = "kuscia",
17-
version = "1.0.0b0",
17+
version = "1.1.0b0",
1818
compatibility_level = 1,
1919
)
2020

build/dockerfile/base/kuscia-deps.Dockerfile

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,52 @@
1414
# limitations under the License.
1515
#
1616

17-
ARG K3S_VER=v1.26.11-k3s2
17+
ARG K3S_VER=v1.33.5-k3s1
1818
ARG K3S_IMAGE=secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/k3s:${K3S_VER}
1919
ARG PROOT_IMAGE=secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/proot
2020
FROM ${PROOT_IMAGE} as proot-image
2121
FROM ${K3S_IMAGE} as k3s-image
2222

2323
FROM secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/anolisos:23
24-
ARG TARGETPLATFORM
2524
ARG TARGETARCH
25+
ARG TARGETOS
2626
RUN yum install -y git glibc-static wget gcc make && \
2727
yum clean all
2828

2929
RUN mkdir -p /image/home/kuscia/bin && \
30-
mkdir -p /image/bin/aux
30+
mkdir -p /image/home/kuscia/libexec/cni
3131

3232
WORKDIR /tmp
3333

3434
COPY --from=proot-image /root/proot/src/proot /image/home/kuscia/bin/
35-
COPY --from=k3s-image /bin/k3s /bin/containerd /bin/containerd-shim-runc-v2 /bin/runc /bin/cni /image/home/kuscia/bin/
36-
COPY --from=k3s-image /bin/aux /image/bin/aux
37-
38-
COPY build/${TARGETPLATFORM}/k3s/bin/k3s /image/home/kuscia/bin/
35+
COPY --from=k3s-image /bin/k3s /bin/runc /bin/cni /image/home/kuscia/bin/
36+
COPY --from=k3s-image /bin/aux /image/home/kuscia/bin/
3937

4038
RUN wget "https://github.com/krallin/tini/releases/download/v0.19.0/tini-${TARGETARCH}" -O /image/home/kuscia/bin/tini && \
4139
chmod +x /image/home/kuscia/bin/tini
40+
41+
ARG CONTAINERD_VERSION=1.7.28
42+
RUN fname="containerd-${CONTAINERD_VERSION}-${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
43+
wget --progress=bar:force:noscroll "https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/${fname}" -O "${fname}" && \
44+
tar xzf "${fname}" -C /tmp && \
45+
cp -rf /tmp/bin/* /image/home/kuscia/bin && \
46+
rm -f "${fname}" && rm -rf /tmp/bin
47+
48+
RUN echo "${TARGETARCH:-amd64}" | sed -e s/amd64/x86_64/ -e s/arm64/aarch64/ | tee /target_uname_m
49+
ARG CNI_PLUGINS_VERSION=v1.7.1
50+
RUN fname="cni-plugins-${TARGETOS:-linux}-${TARGETARCH:-amd64}-${CNI_PLUGINS_VERSION}.tgz" && \
51+
wget --progress=bar:force:noscroll "https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGINS_VERSION}/${fname}" -O "${fname}" && \
52+
tar xzf "${fname}" -C /image/home/kuscia/libexec/cni && \
53+
rm -f "${fname}"
54+
55+
ARG ROOTLESSKIT_VERSION=v2.3.5
56+
RUN fname="rootlesskit-$(cat /target_uname_m).tar.gz" && \
57+
wget --progress=bar:force:noscroll "https://github.com/rootless-containers/rootlesskit/releases/download/${ROOTLESSKIT_VERSION}/${fname}" -O "${fname}" && \
58+
tar xzf "${fname}" -C /image/home/kuscia/bin && \
59+
rm -f "${fname}" /image/home/kuscia/bin/rootlesskit-docker-proxy
60+
61+
ARG SLIRP4NETNS_VERSION=v1.3.1
62+
RUN fname="slirp4netns-$(cat /target_uname_m)" && \
63+
wget --progress=bar:force:noscroll "https://github.com/rootless-containers/slirp4netns/releases/download/${SLIRP4NETNS_VERSION}/${fname}" -O "${fname}" && \
64+
mv "${fname}" /image/home/kuscia/bin/slirp4netns && \
65+
chmod +x /image/home/kuscia/bin/slirp4netns

build/dockerfile/kuscia-anolis.Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
# limitations under the License.
1515
#
1616

17-
ARG DEPS_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-deps:0.6.1b0"
17+
ARG DEPS_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-deps:0.7.0b0"
1818
ARG KUSCIA_ENVOY_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/kuscia-envoy:0.6.2b0"
19-
ARG PROM_NODE_EXPORTER="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/node-exporter:v1.7.0"
19+
ARG PROM_NODE_EXPORTER="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/node-exporter:v1.9.1"
2020
ARG BASE_IMAGE="secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow/anolisos:23"
2121

22-
FROM ${DEPS_IMAGE} as deps
22+
FROM ${DEPS_IMAGE} AS deps
2323

24-
FROM ${PROM_NODE_EXPORTER} as node_exporter
25-
FROM ${KUSCIA_ENVOY_IMAGE} as kuscia_envoy
24+
FROM ${PROM_NODE_EXPORTER} AS node_exporter
25+
FROM ${KUSCIA_ENVOY_IMAGE} AS kuscia_envoy
2626

2727
FROM ${BASE_IMAGE}
2828

@@ -52,12 +52,10 @@ RUN useradd -ms /bin/bash kuscia && \
5252
chmod -R g+rwxs /home/kuscia
5353

5454
COPY --chown=kuscia:kuscia --from=deps /image/home/kuscia/bin ${HOME_DIR}/bin
55-
COPY --chown=kuscia:kuscia --from=deps /image/bin/aux /bin/aux
5655
COPY --chown=kuscia:kuscia --from=node_exporter /bin/node_exporter ${HOME_DIR}/bin
5756

5857
RUN pushd ${HOME_DIR}/bin && \
5958
ln -s k3s crictl && \
60-
ln -s k3s ctr && \
6159
ln -s k3s kubectl && \
6260
ln -s cni bridge && \
6361
ln -s cni flannel && \

changelog/v1.0.0_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- **[问题修复]** Kuscia 使用 PostgreSQL 作为元数据存储时连接异常问题
4343

4444
****
45+
4546
- Alpha功能还在完善中,未经质量测试,不适合在实际的生产环境中使用。
4647

4748
---
@@ -90,4 +91,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9091
- **[Bugfix]** Kuscia connection exception when using PostgreSQL as metadata storage
9192

9293
**Note**
94+
9395
- Alpha features are still under development and have not been quality tested, so they are not suitable for use in actual production environments.

0 commit comments

Comments
 (0)