Use a default value for BaseTaskData.task_configuration (#1012)
#1012 (closed) raises the need for a default lookup for task configuration collections, and this implements it by adding a default value in debusine.task.models.BaseTaskData
. There are a number of interesting details to make explicit here:
- While task configuration is now looked up by default, it is possible to disable the lookup by setting
task_configuration
toNone
- For workspaces where the
default
task configuration collection is not present, all tasks would fail withKeyError
:'default@debusine:task-configuration' does not exist or is hidden
. To work around that, we silently fail if the task configuration collection is not found, but only if the lookup isdefault@debusine:task-configuration
: this preserves useful error messages in case one mistypes the custom task-configuration collection name