Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rhyw opened this issue Jun 14, 2024 · 2 comments
Closed

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

rhyw opened this issue Jun 14, 2024 · 2 comments

Comments

@rhyw
Copy link
Contributor

rhyw commented Jun 14, 2024

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?

@kdudka
Copy link
Contributor

kdudka commented Jun 14, 2024

@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
Copy link
Contributor Author

rhyw commented Jun 17, 2024

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!

@rhyw rhyw closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants