release-engineering/kobo

Extend the hub.models.Task to store user-specified additional metadata

rhyw opened this issue · 2 comments

rhyw commented

As subject. Preferably with json format. Benefits includes to allow filtering of tasks based on metadata / pipeline integration etc. Currently there is comment field that allows some random text, which seems to have limited filtering capabilities.

I'm filing this issue to see if there's any objection of this? If it's not an option, I'd have to extend the models in our app that depend on kobo's Task model.

See also: https://issues.redhat.com/browse/OSH-567 for a more detailed use case.

@rohanpm @kdudka @lzaoral any objections to this?

@rhyw Why cannot you put the data into args, which is a JSON serialized dictionary already?

args = kobo.django.fields.JSONField(blank=True, default={}, help_text=_("Method arguments. JSON serialized dictionary."))

See also: https://issues.redhat.com/browse/OSH-567 for a more detailed use case.

Let's be transparent. Such links cannot be accessed by community members who are not Red Hat employees.

rhyw commented

I'll avoid pasting internal links here in future, thanks for the reminder.

I was aware of the args field earlier, however after a quick look I thought that metadata don't fit to any existing keys in args.

I checked it again, we could definitely add a new key to store the metadata specified from the command line. I'll mark this as closed, thanks!