Skip to content

Commit b24a9b4

Browse files
committed
Merge branch 'main' into feat/observability-proxy-exported-namespace
Resolve the overlap with the per-application roots: the namespace root keeps its platform exporter branch, the application root still replaces the whole scope with its own selectors, and the label APIs mark the repeated scope so that replacement reaches match[] as well. Assisted-by: LLM Signed-off-by: Maxim Belyy <[email protected]>
2 parents 473cfdf + 4f7eb63 commit b24a9b4

311 files changed

Lines changed: 15091 additions & 4893 deletions

File tree

Some content is hidden

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

‎Makefile‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,14 @@ rd-presets-check:
139139
migrations-target-check:
140140
hack/check-migrations-target.sh
141141

142-
# Scoped go test over the cozystack-api surface that this repo owns. Kept
143-
# narrow intentionally - running `go test ./...` pulls in generated code
144-
# round-trip suites whose behavior depends on tool versions outside this
145-
# repo's control (kubebuilder, openapi-gen, etc.) and is better exercised
146-
# from their generator workflows.
142+
# Go tests of the cozystack-api surface and of the standalone packages and
143+
# commands listed here, whose tests need no cluster. Kept narrow
144+
# intentionally - running `go test ./...` pulls in generated code round-trip
145+
# suites whose behavior depends on tool versions outside this repo's control
146+
# (kubebuilder, openapi-gen, etc.) and is better exercised from their
147+
# generator workflows.
147148
go-unit-tests:
148-
go test ./pkg/registry/... ./pkg/config/... ./pkg/cmd/server/...
149+
go test ./pkg/registry/... ./pkg/config/... ./pkg/cmd/server/... ./pkg/lineage/... ./pkg/ovnstatus/... ./pkg/reservation/... ./cmd/cozypkg/... ./cmd/check-readiness/...
149150

150151
# The nested Go modules (image sources and the published API types) are
151152
# outside ./... of the root module, so no other target reaches their tests.
@@ -158,9 +159,7 @@ go-module-tests:
158159
done
159160

160161
# Go tests for the controllers and supporting packages under ./internal.
161-
# Excludes ./pkg/... and ./cmd/... — those are run separately by
162-
# go-unit-tests above (pkg subset) and skipped (cmd) until their tests
163-
# stabilise. CI schedules this target in the same four-slot make invocation as
162+
# CI schedules this target in the same four-slot make invocation as
164163
# unit-tests; locally invoke it directly or chain the two targets.
165164
test-controllers:
166165
go test ./internal/... -count=1
@@ -195,7 +194,8 @@ test-controllers-envtest: $(SETUP_ENVTEST)
195194
test-check-readiness:
196195
go test ./test/check-readiness/ -count=1
197196

198-
# ./cmd/... is excluded from go-unit-tests, so the batch tool needs its own target.
197+
# The batch tool's suite drives real git repositories for minutes, so it is
198+
# kept out of go-unit-tests in a target of its own.
199199
test-backport-batch:
200200
go test ./cmd/backport-batch/... -count=1
201201

‎api/apps/v1alpha1/bucket/types.go‎

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

‎api/apps/v1alpha1/postgresql/types.go‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/redis/types.go‎

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

‎api/apps/v1alpha1/redis/zz_generated.deepcopy.go‎

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

‎api/apps/v1alpha1/vminstance/types.go‎

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

‎api/apps/v1alpha1/vminstance/zz_generated.deepcopy.go‎

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

‎api/v1alpha1/workloadmonitor_types.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ type WorkloadMonitorSpec struct {
3939
// that is not operational because a DataVolume it selects is not ready.
4040
const WorkloadMonitorReasonDataVolumeNotReady = "DataVolumeNotReady"
4141

42+
// WorkloadMonitorReasonBucketClaimNotReady is the status Reason of a monitor
43+
// that is not operational because a BucketClaim it selects is not provisioned.
44+
const WorkloadMonitorReasonBucketClaimNotReady = "BucketClaimNotReady"
45+
4246
// WorkloadMonitorStatus defines the observed state of WorkloadMonitor
4347
type WorkloadMonitorStatus struct {
4448
// Operational indicates if the workload meets all operational requirements

‎cmd/backport-batch/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Requires `git` and an authenticated `gh` on PATH, and a remote called `origin`.
2727

2828
Build the binary wherever an exit code matters: `go run` turns any non-zero exit into its own `1`, so under it a check that could not be completed looks the same as one that found something missing.
2929

30+
Output is written before a push or a publish. Once a write to stdout or stderr fails, a closed pipe included, the run changes nothing more: no push, no GitHub write, no local branch move, and no new pick; a pick already in flight still finishes its rollback. It exits 2 where it would have exited 0, saying on stderr, while it still can, that the output was lost. A confirmation lost after a push or a publish fails the run the same way.
31+
3032
### run
3133

3234
Switches the current working tree to `backport-batch/<line>-<yyyymmdd>`, created at `origin/<line>`, and picks onto it one original at a time, in the order they merged into `main`, as one unit each on the branch's first-parent line. A pull request merged into `main` with a merge commit `M` goes on as its own commits, `git rev-list --reverse --topo-order --no-merges M^1..M^2`, each picked with `git cherry-pick -x --signoff`, so each keeps its author, message and sign-offs and gains the `(cherry picked from commit …)` line; the merges that brought `main` into its branch are left out, since `main` already has what they brought. A merge commit then joins the picks to the batch: its first parent is the batch before the original, its second the last pick, and its message is `M`'s with a paragraph of its own, `Backported-from: M`. A pull request squash-merged into `main` goes on as one pick. When any commit of an original conflicts, the pick is aborted, the branch goes back to where it was before that original, and the original is recorded with the commit that failed and its files; the run goes on with the next one. A commit the branch already carries is skipped as empty, and an original none of whose commits changes anything is reported as carried. The tree has to be clean. A local branch of that name is reset to where the run starts; when that drops commits only it has, the run first prints its tip and the `git branch` command that restores them, and so does `--defer`. Signing follows your git configuration; hooks are off for the picks and the merge, so each commit carries its message as git writes it.

‎cmd/backport-batch/apisurface.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func apiSnapshot(commit string) (apigate.Snapshot, error) {
9999
if err != nil {
100100
return nil, err
101101
}
102-
defer os.RemoveAll(dir)
102+
defer func() { _ = os.RemoveAll(dir) }()
103103
for name, blob := range paths {
104104
file := filepath.Join(dir, filepath.FromSlash(name))
105105
if err := os.MkdirAll(filepath.Dir(file), 0o700); err != nil {

0 commit comments

Comments
 (0)