Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.2.x] cluster: Parse unknown self-test checks #22922

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22831

Only applied to `[v24.2.x]` and `[dev]` branches. See
redpanda-data#22778 for change
to `[v24.1.x]`.

Also bumps `serde::version` of `start_test_request` to 2. This
`serde::version<>` needed bumping to `serde::version<2>`, since
`serde::version<0>` is the version of `start_test_request` with just
`diskcheck_opts` and `netcheck_opts`, while `serde::version<1>` is the
version with `unknown_checks` added, and `serde::version<2>` needs to
reflect the most recently added `cloudcheck_opts`.

Also, re-order fields in `start_test_request` to allow serde to work
correctly in the interim.

(cherry picked from commit 1f8e4cd)
In the case that the controller node which originally parsed the
`rpk cluster self-test start` command was of a lower version than
the follower nodes in a cluster, it is possible that some tests
may not have been recognized by the controller, and instead pushed
back into `start_test_request.unknown_checks`. On these upgraded
follower nodes, they will attempt to parse any `unknown_checks`, in
case they recognize them.

This is currently only affecting the `cloudcheck` self-test, in mixed
clusters with versions before and after `v24.2.x`. However, any future
self-tests that get added to `redpanda` should also add their case to
`parse_unknown_checks()` for completion's sake.

(cherry picked from commit 016487c)
This struct was erroneously altered by adding a new field without bumping
the `serde::version<>`. This struct also lacks a `serde_fields()` implementation,
so adding the new field anywhere but the end of the structure is an issue
for serialization/deserialization.

Update it by moving the field to the end of the struct, and bumping the
`serde::version<>` to 1.

(cherry picked from commit fb3fd6d)
NFCs in this commit.

(cherry picked from commit cefe877)
Clean up the `self_test_backend` and `admin/server` parse sites
for self-test JSON parsing by adding `parse_self_test_checks()`.

This will now be the function called from `server::self_test_start_handler()`
as well as `self_test_backend::do_start_test()`.

Also, rename `unknown_check` to `unparsed_check` for clarity. These
unparsed checks are still considered "unknown" if they exist by the
end of the self-test.

(cherry picked from commit bbd6445)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Aug 16, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 16, 2024
@WillemKauf WillemKauf merged commit bbc0b8e into redpanda-data:v24.2.x Aug 16, 2024
20 checks passed
@BenPope BenPope modified the milestones: v24.2.x-next, v24.2.3 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants