You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 36082b2
Browse filesBrowse the repository at this point in the historyBrowse files
chore(tests): merge upstream main with LINSTOR bootstrap fix
Keep the fork test environment aligned with the platform images so
LINSTOR database migration and controller versions agree during setup.
Signed-off-by: Ahmed Kamal <[email protected]>
Assisted-by: LLM
Copy file name to clipboardExpand all lines: Makefile
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -139,13 +139,14 @@ rd-presets-check:
139
139
migrations-target-check:
140
140
hack/check-migrations-target.sh
141
141
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.
147
148
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/...
149
150
150
151
# The nested Go modules (image sources and the published API types) are
151
152
# outside ./... of the root module, so no other target reaches their tests.
@@ -158,9 +159,7 @@ go-module-tests:
158
159
done
159
160
160
161
# 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
164
163
# unit-tests; locally invoke it directly or chain the two targets.
Copy file name to clipboardExpand all lines: cmd/backport-batch/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ Requires `git` and an authenticated `gh` on PATH, and a remote called `origin`.
27
27
28
28
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.
29
29
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
+
30
32
### run
31
33
32
34
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.
Copy file name to clipboardExpand all lines: cmd/backport-batch/assemble.go
+28-15Lines changed: 28 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ func (a *app) run(args []string) int {
153
153
}
154
154
// The scheduled job has half an hour for every line; this says where it
155
155
// goes.
156
-
fmt.Fprintf(a.stderr, "prepared %s in %s, %s of it judging partial units and what originals build on\n", l.branch(), time.Since(started).Round(time.Millisecond), b.detecting.Round(time.Millisecond))
156
+
_, _=fmt.Fprintf(a.stderr, "prepared %s in %s, %s of it judging partial units and what originals build on\n", l.branch(), time.Since(started).Round(time.Millisecond), b.detecting.Round(time.Millisecond))
fmt.Fprintf(a.stderr, "resetting the local %s from %s, dropping commits %.12s does not carry; git branch %s-%.12s %s restores them\n", branch, old, start, branch, old, old)
543
+
// The hint is the only way back to the dropped commits, so the reset does
544
+
// not run when it could not be written.
545
+
if_, err:=fmt.Fprintf(a.stderr, "resetting the local %s from %s, dropping commits %.12s does not carry; git branch %s-%.12s %s restores them\n", branch, old, start, branch, old, old); err!=nil {
546
+
returnfmt.Errorf("not resetting the local %s: %w", branch, err)
547
+
}
541
548
returnnil
542
549
}
543
550
@@ -719,6 +726,9 @@ func (a *app) publish(b *batch, p publication, rebuilt bool) error {
0 commit comments