We recently shipped support for specifying the operating system used for RWX runs.
Interface Considerations
When designing the feature, we had to decide how to approach the configuration.
Should the operating system be required in the configuration? We like keeping our configuration syntax as minimal as possible, so we wanted to omit it. We didn't like the idea of having to type boilerplate lines of configuration in every run definition.
However, without specifying, how would we choose which operating system to run? We could always run the latest, but this would run the risk of runs breaking whenever we released newer operating systems. We care a lot about making sure runs never spontaneously break, so we didn't like the idea of ever automatically rolling out a new version.
There are techniques that dev tool companies use to mitigate this problem, such as sending out advanced notices with recommendations to test, or configuring a default value out-of-band, such as in the web UI for the account. We considered those approaches undesirable.
Config Injection with the CLI
After some contemplation, Tommy suggested having the CLI automatically inject the base OS configuration. It's the best of both worlds.
- Engineers can start runs without having to configure boilerplate for the operating system
- Run definitions are configured to use an explicit operating system, so we never run the risk of breaking backwards compatibility
Since engineers are already testing RWX run definitions using the CLI, we can make the operating system required without requiring people to enter it themselves.
Automatic configuration is the best technique to have explicit values without requiring boilerplate.
Example
Start with a config file without an operating system specified
1tasks:2- key: hello-world3run: echo "hello world"
Run the file
rwx run --file tasks.yml --open
Have the base operating system automatically configured
1base:2os: ubuntu 24.043tag: 1.145tasks:6- key: hello-world7run: echo "hello world"
Demo
Related posts
Read more on updates and advice from the RWX engineering team