Currently there's no clear way to handle arguments that are not passed, or returning information with/without defaults.
This will become simpler when we have storage, but for now, the idea is:
- For input
- In API the models, set the defaults to the values we want to be defaults
- In the Core models, set the default to the same
- When transforming from API -> Core models, exclude unset fields from API (model_dump(exclude_unset=True))
- When fetching the job from k8s
- Don't pass to the model any of the fields if they match the defaults (this breaks slightly idempotence, because if the user explicitly passed a value that matches the default, it will be lost as a default, but that will be sorted once we have storage)
- For output
- Add a new parameter include_unset: bool, default to true, that:
- If passed as true (default), will return the object with all the fields that were not passed and set to defaults on job creation (ex. for jobs list/show)
- If passed as false, will exclude the fields that were not passed when creating the job and set to their default values (ex. for job dumps or config generate)
- Add a new parameter include_unset: bool, default to true, that: