Automation/job yaml file configuring

Hey @CamDavidsonPilon,

Hope youre doing well.

Quick question for you. Been chasing a bug in a custom dosing automation subclass I wrote. I had used the same name(variable) in the yaml file for the job name and one of the published setting -key that i wanted to load into the automation via the gui.

This did not produce any errors but instead just did not load the value into the code when I changed it when starting job using the gui and defaulted to the click command default value.

All that said, I stumbled on the answer was to change the key name to something else but I do not know why this worked. Can you point me in the right direction on how the flow works regarding the interpretation/loading of yaml file variables?

Thank you!

Hi @rafik.n,

Hm, I’m not sure what is causing the original issue.

The UI automation dialog is populated by this endpoint: /api/contrib/automations/<automation_type> - it just converts yaml files to a big json blob.

When starting an automation, the UI sends a web request to /unit_api/jobs/run/job_name/<job> here, and that converts some GET parameters to CLI parameters. Then that creates a background task here to be run.