rufio icon indicating copy to clipboard operation
rufio copied to clipboard

Task Spec should define a `machineRef` not a `connection`

Open jacobweinstock opened this issue 2 years ago • 3 comments

The Task spec currently doesn't allow referencing a machine but requires the full connection details. Tasks should not require the full connection details. It should instead reference a machine like the Job spec does.

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

jacobweinstock avatar May 11 '23 22:05 jacobweinstock

This was by design, though I don't recall the details. What's the motivation to change it?

chrisdoherty4 avatar May 12 '23 01:05 chrisdoherty4

The UX of jobs is nice. I dont need to add connection details per job. I could see the util in keeping the connection object in a task so that one off tasks can be defined without needing to have a machine CR or before one is created. But once a machine CR exists, having to define the connection details for every tasks is not ideal. Maybe tasks could take either a machine ref or connection details.

jacobweinstock avatar May 12 '23 01:05 jacobweinstock

A mutually exclusive field with the connection field sounds quite flexible; I'd probably be in favor of that.

chrisdoherty4 avatar May 12 '23 02:05 chrisdoherty4