feat(byot): assert post-adoption talos upgrade flow in integration tests - #494
Open
Paul Thuriot (pthuriot-corti) wants to merge 1 commit into
Open
Paul Thuriot (pthuriot-corti) wants to merge 1 commit into
Paul Thuriot (pthuriot-corti) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Paul Thuriot (pthuriot-corti)
September 11, 2026 11:24
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Upgrade polling does not yet surface failure reasons and can abort on transient status gaps.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds BYOT Talos upgrade-status helpers and integration coverage for real post-adoption upgrades.
Changes:
- Adds upgrade polling and image-reference helpers.
- Parameterizes boot Talos versions.
- Adds fresh-adoption and Talos upgrade assertions.
File summaries
| File | Reviewed changes |
|---|---|
pkg/test/helpers/byothelpers.go |
Adds upgrade status parsing and completion polling. |
pkg/test/byot_test.go |
Adds BYOT upgrade integration coverage. |
Review details
Suppressed comments (1)
pkg/test/helpers/byothelpers.go:668
- This calls
ByotMachineConditionStatefrom inside a polling closure, but that accessor usesrequire.Truewhenstatus.conditionsis not present andrequire.NoErrorfor a transient GET failure. A newly claimed ByotMachine can still be between creation and its first status update, so the first poll can abort the test instead of retrying; the existingbyotMachineConditionCheckalready treats those states as “not ready”. Use that tolerant check here, or make the accessor returnUnknown/retryable results rather than failing the test.
condStatus, reason := ByotMachineConditionState(
ctx, t, env, namespace, machineName, ByotMachineConditionTalosVersionReady)
if condStatus != corev1.ConditionTrue || reason != ByotUpgradeReasonUpgraded {
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+662
to
+664
| if status.UpgradeState != "" { | ||
| return false, nil // still in flight or failed | ||
| } |
Go test coverage: 22.7% for commit 030ec73
|
Paul Thuriot (pthuriot-corti)
force-pushed
the
test/byot-talos-upgrade-flow
branch
2 times, most recently
from
September 11, 2026 14:28
ba1f31b to
949ad17
Compare
Add upgrade-status helpers (GetByotMachineUpgradeStatus, WaitForByotMachineUpgradeSettled, InstallerTagFromRef, GetByotTalosImageName) and parameterize startByotHosts with the boot Talos version. TestByotClusterFreshAdopt now asserts every ByotMachine has desiredTalosVersion stamped from talos.imageName and the post-adoption upgrade state machine reached a terminal state (Upgraded on real hardware; Failed in Talos-in-Docker, where the LifecycleClient.Upgrade RPC is unsupported with "method is not supported in container mode"). New TestByotClusterTalosUpgrade boots maintenance containers at v1.13.0 (older than the chart target v1.13.8) and asserts the same settle; on real hardware it additionally verifies status.currentTalosVersion moved to the target tag, while in container mode that version-change check is skipped (UpgradeAppliedImageRef empty) since the upgrade cannot complete. Signed-off-by: Paul Thuriot <pth@corti.ai>
Paul Thuriot (pthuriot-corti)
force-pushed
the
test/byot-talos-upgrade-flow
branch
from
September 17, 2026 08:11
949ad17 to
fad3af1
Compare
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.
Add upgrade-status helpers (GetByotMachineUpgradeStatus, WaitForByotMachineUpgradeComplete, InstallerTagFromRef, GetByotTalosImageName) and parameterize startByotHosts with the boot Talos version.
TestByotClusterFreshAdopt now asserts every ByotMachine reaches TalosVersionReady=True/Upgraded (the upgrade the merged talos.version wiring enables via desiredTalosVersion) before the node-count check, so a failed upgrade surfaces with its reason instead of an opaque timeout.
New TestByotClusterTalosUpgrade boots maintenance containers at v1.13.0 and asserts the chart target (talos.imageName, v1.13.8) moves status.currentTalosVersion to the target tag — proving a real version change, not a same-version reinstall.
Signed-off-by: Paul Thuriot pth@corti.ai