talos icon indicating copy to clipboard operation
talos copied to clipboard

Extract common tasks as simple function calls

Open smira opened this issue 1 year ago • 1 comments

Code in question: https://github.com/siderolabs/talos/blob/1fb8453c2db1659dd6c1670e4174125b26e777c5/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go#L89-L103

Here we execute a sequence of steps (a bit different for containers/non-containers), which might look better as a simple sequence of Go function calls with defer steps to undo the action, as they should be called strictly before anything else starts running, and undone before the machine shuts down operations.

smira avatar Jun 12 '24 14:06 smira