Repository navigation
test: make the REST and e2e harnesses reliable off the project's own stands - #199
Draft
Andrei Kvapil (kvaps) wants to merge 3 commits into
Draft
Andrei Kvapil (kvaps) wants to merge 3 commits into
Andrei Kvapil (kvaps) wants to merge 3 commits into
Conversation
…abel
Worker discovery asked "which nodes are not control-plane", and every
cell then used the answer as "which nodes run a satellite". Those are
the same set on the project's own stands and not elsewhere: a Cozystack
cluster of three control-plane nodes runs satellites on all three and
has no node without the label, so the selector returned nothing,
WORKER_1..3 came back empty and require_workers skipped every scenario
as unexercisable. A stand where nothing can be exercised is
indistinguishable from a stand where everything passes.
The satellite DaemonSet is the authority on the question actually being
asked, so it answers when the label selector cannot: one extra call,
and only on the clusters where the first answer was empty.
require_workers counts Ready off that same set rather than re-running
the selector. BS_WORKERS overrides both, for a stand whose shape
neither rule fits.
The worker-count expansion is guarded for bash older than 4.4, which
treats "${empty[@]}" as unbound under `set -u` and would turn "this
cluster has no satellites" into a crash inside the preflight whose job
is to report it.
Verified against a three-control-plane Cozystack cluster: discovery
returns all three nodes and the preflight passes where it previously
skipped.
Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
pickFreeAddr closes its probe listener before Start binds, so a parallel test can take the port in between. The readiness dial then reached that test's server, this one had already failed to bind, and every request was answered by a store that never held the fixture, which surfaced as a 404 from the handler under test. The harness now waits for the server's OnReady and retries a bind that lost the race on a fresh port. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
The runner discovered nodes the way the cli-matrix lib did, as "not a control-plane node", so on a Cozystack cluster of three control-plane nodes it found none and skipped every workflow. The satellite DaemonSet answers when the label selector cannot, and BS_WORKERS overrides both. The pool name is a property of the stand, not of the workflow: the project's stands call it `stand`, a Cozystack cluster calls it whatever its LinstorCluster declares. BS_SP overrides it, which is the difference between a harness and a fixture. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three test-harness fixes split out of #190, independent of it.
OnReadyfires, not when a dial succeeds.pickFreeAddrreleases its probe port beforeStartbinds, so a parallel test could take it: the readiness dial then reached that test's server, and the handler under test answered 404 from a store that never held the fixture. A bind that loses the race is retried on a fresh port.BS_WORKERSandBS_SPlet a stand override the replay's node list and pool name.It does not fix the separate
server did not stop within 2s after cancelflake inpkg/rest, which comes from howstartServerWithStorestops the server.