Skip to content

Commit 2dbdca4

Browse files
authored
chore: backport changes from kubefleet 08/27/2025 (#1183)
2 parents 4ca6ded + 15ead1a commit 2dbdca4

File tree

167 files changed

+15038
-3514
lines changed

Some content is hidden

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

167 files changed

+15038
-3514
lines changed

.github/workflows/chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
with:
2323
submodules: true
2424
fetch-depth: 0

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
1414

1515
env:
16-
GO_VERSION: '1.24.4'
16+
GO_VERSION: '1.24.6'
1717

1818
jobs:
1919
detect-noop:
@@ -40,7 +40,7 @@ jobs:
4040
go-version: ${{ env.GO_VERSION }}
4141

4242
- name: Check out code into the Go module directory
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v5
4444

4545
- name: Set up Ginkgo CLI
4646
run: |
@@ -70,7 +70,7 @@ jobs:
7070
go-version: ${{ env.GO_VERSION }}
7171

7272
- name: Check out code into the Go module directory
73-
uses: actions/checkout@v4
73+
uses: actions/checkout@v5
7474

7575
- name: Install Kind
7676
# Before updating the kind version to use, verify that the current kind image
@@ -89,12 +89,16 @@ jobs:
8989
strategy:
9090
fail-fast: false
9191
matrix:
92-
customized-settings: [default, joinleave, custom]
92+
customized-settings: [default, resourceplacement, joinleave, custom]
9393
include:
9494
- customized-settings: default
9595
# to shorten the test duration, set the resource snapshot creation interval to 0
9696
resource-snapshot-creation-minimum-interval: 0m
9797
resource-changes-collection-duration: 0m
98+
- customized-settings: resourceplacement
99+
# to shorten the test duration, set the resource snapshot creation interval to 0
100+
resource-snapshot-creation-minimum-interval: 0m
101+
resource-changes-collection-duration: 0m
98102
- customized-settings: joinleave
99103
# to shorten the test duration, set the resource snapshot creation interval to 0
100104
resource-snapshot-creation-minimum-interval: 0m
@@ -121,7 +125,7 @@ jobs:
121125
go-version: ${{ env.GO_VERSION }}
122126

123127
- name: Check out code into the Go module directory
124-
uses: actions/checkout@v4
128+
uses: actions/checkout@v5
125129

126130
- name: Install Ginkgo CLI
127131
run: |
@@ -136,7 +140,9 @@ jobs:
136140
- name: Run e2e tests
137141
run: |
138142
if [ "${{ matrix.customized-settings }}" = "default" ]; then
139-
make e2e-tests LABEL_FILTER="!custom && !joinleave"
143+
make e2e-tests LABEL_FILTER="!custom && !joinleave && !resourceplacement"
144+
elif [ "${{ matrix.customized-settings }}" = "resourceplacement" ]; then
145+
make e2e-tests LABEL_FILTER="!custom && resourceplacement"
140146
elif [ "${{ matrix.customized-settings }}" = "joinleave" ]; then
141147
make e2e-tests LABEL_FILTER="!custom && joinleave"
142148
else

.github/workflows/code-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.24.4'
17+
GO_VERSION: '1.24.6'
1818

1919
jobs:
2020

@@ -43,7 +43,7 @@ jobs:
4343
go-version: ${{ env.GO_VERSION }}
4444

4545
- name: Checkout
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v5
4747
with:
4848
submodules: true
4949

@@ -64,7 +64,7 @@ jobs:
6464
go-version: ${{ env.GO_VERSION }}
6565

6666
- name: Check out code into the Go module directory
67-
uses: actions/checkout@v4
67+
uses: actions/checkout@v5
6868

6969
- name: golangci-lint
7070
run: make lint

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
egress-policy: audit
1818

19-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
19+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.1.7
2020
- uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # master
2121
with:
2222
check_filenames: true

.github/workflows/markdown-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
markdown-link-check:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
- uses: tcort/github-action-markdown-link-check@v1
1515
with:
1616
# this will only show errors in the output

.github/workflows/trivy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
MEMBER_AGENT_IMAGE_NAME: member-agent
1919
REFRESH_TOKEN_IMAGE_NAME: refresh-token
2020

21-
GO_VERSION: '1.24.4'
21+
GO_VERSION: '1.24.6'
2222

2323
jobs:
2424
export-registry:
@@ -44,10 +44,10 @@ jobs:
4444
go-version: ${{ env.GO_VERSION }}
4545

4646
- name: Checkout code
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@v5
4848

4949
- name: Login to ${{ env.REGISTRY }}
50-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
50+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
5151
with:
5252
registry: ${{ env.REGISTRY }}
5353
username: ${{ github.actor }}

.github/workflows/upgrade.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
1818

1919
env:
20-
GO_VERSION: '1.24.4'
20+
GO_VERSION: '1.24.6'
2121

2222
jobs:
2323
detect-noop:
@@ -44,7 +44,7 @@ jobs:
4444
go-version: ${{ env.GO_VERSION }}
4545

4646
- name: Check out code into the Go module directory
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@v5
4848
with:
4949
# Fetch the history of all branches and tags.
5050
# This is needed for the test suite to switch between releases.
@@ -127,7 +127,7 @@ jobs:
127127
go-version: ${{ env.GO_VERSION }}
128128

129129
- name: Check out code into the Go module directory
130-
uses: actions/checkout@v4
130+
uses: actions/checkout@v5
131131
with:
132132
# Fetch the history of all branches and tags.
133133
# This is needed for the test suite to switch between releases.
@@ -210,7 +210,7 @@ jobs:
210210
go-version: ${{ env.GO_VERSION }}
211211

212212
- name: Check out code into the Go module directory
213-
uses: actions/checkout@v4
213+
uses: actions/checkout@v5
214214
with:
215215
# Fetch the history of all branches and tags.
216216
# This is needed for the test suite to switch between releases.

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 15m
3-
go: '1.24.4'
3+
go: '1.24.6'
44

55
linters-settings:
66
stylecheck:

CLAUDE.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,16 @@ cmd/memberagent/ # Member agent main and setup
159159
## Testing Patterns
160160

161161
### Unit Tests
162-
- Use `testify` for assertions
162+
- Avoid the use of ‘assert’ libraries.
163163
- Controllers use `envtest` for integration testing with real etcd
164164
- Mock external dependencies with `gomock`
165165
- Unit test files: `<go_file>_test.go` in same directory
166166
- Table-driven test style preferred
167+
- Use cmp.Equal for equality comparison and cmp.Diff to obtain a human-readable diff between objects.
168+
- Test outputs should output the actual value that the function returned before printing the value that was expected. A usual format for printing test outputs is “YourFunc(%v) = %v, want %v”.
169+
- If your function returns a struct, don’t write test code that performs an individual comparison for each field of the struct. Instead, construct the struct that you’re expecting your function to return, and compare in one shot using diffs or deep comparisons. The same rule applies to arrays and maps.
170+
- If your struct needs to be compared for approximate equality or some other kind of semantic equality, or it contains fields that cannot be compared for equality (e.g. if one of the fields is an io.Reader), tweaking a cmp.Diff or cmp.Equal comparison with cmpopts options such as cmpopts.IgnoreInterfaces may meet your needs (example); otherwise, this technique just won’t work, so do whatever works.
171+
- If your function returns multiple return values, you don’t need to wrap those in a struct before comparing them. Just compare the return values individually and print them.
167172

168173
### Integration Tests
169174
- Located in `test/integration/` and `test/scheduler/`
@@ -181,6 +186,9 @@ cmd/memberagent/ # Member agent main and setup
181186

182187
### Test Coding Style
183188
- Use `want` or `wanted` instead of `expect` or `expected` when creating the desired state
189+
- Comments that are complete sentences should be capitalized and punctuated like standard English sentences. (As an exception, it is okay to begin a sentence with an uncapitalized identifier name if it is otherwise clear. Such cases are probably best done only at the beginning of a paragraph.)
190+
- Comments that are sentence fragments have no such requirements for punctuation or capitalization.
191+
- Documentation comments should always be complete sentences, and as such should always be capitalized and punctuated. Simple end-of-line comments (especially for struct fields) can be simple phrases that assume the field name is the subject.
184192

185193
## Key Patterns
186194

0 commit comments

Comments
 (0)