Skip to content

feat: machineconfig-restore capability + 5 unit tests (session/25)#41

Merged
ontave merged 1 commit into
mainfrom
session/25-machineconfig-restore
May 6, 2026
Merged

feat: machineconfig-restore capability + 5 unit tests (session/25)#41
ontave merged 1 commit into
mainfrom
session/25-machineconfig-restore

Conversation

@ontave
Copy link
Copy Markdown
Contributor

@ontave ontave commented May 6, 2026

Summary

  • Adds CapabilityMachineConfigRestore = "machineconfig-restore" constant to pkg/runnerlib/constants.go.
  • Implements machineConfigRestoreHandler.Execute(): reads TalosMachineConfigRestore CR for backupTimestamp/s3SourceBucket/targetNodes, downloads per-node config from S3 at {cluster}/machineconfigs/{ts}/{hostname}.yaml, applies via ApplyConfiguration, waits for node stable. Non-fatal per node -- failures recorded in Steps, continues to remaining nodes. Returns ExecutionFailure only when all nodes fail.
  • Registers handler in stubs.go.
  • 5 unit tests covering: nil clients, no CR, success, download failure, targetNodes filter.

Test plan

  • go test ./internal/capability/... -run TestMachineConfigRestore -- all 5 PASS (confirmed locally)
  • go test ./... -- all pass (confirmed locally)
  • CI green

…ion/25)

Adds machineconfig-restore named capability: reads TalosMachineConfigRestore
CR for backupTimestamp/s3SourceBucket/targetNodes, downloads per-node config
from S3 at {cluster}/machineconfigs/{ts}/{hostname}.yaml, applies via
ApplyConfiguration, waits for node stable. Non-fatal per node. Registers
handler in stubs.go. Adds CapabilityMachineConfigRestore constant to
runnerlib. conductor-schema.md §6, platform-schema.md §11.
@ontave ontave merged commit 3b880eb into main May 6, 2026
2 checks passed
@ontave ontave deleted the session/25-machineconfig-restore branch May 6, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant