#370 Add new 'metadata' field in the manual rebuild API to store additional metadata for Event.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker requester_metadata  into  master

Download 370.patch

The 'metadata' can be set to any JSON and its value is availabe in the Events API
and also in the fedmsgs as 'requester_metadata'.

:thumbsup:

Could we possibly use PostgreSQL's json support? Not sure how well that will play with SQLAlchemy

Do we need to validate that this is an JSON object? Instead, of say an Array?

This is not not well supported in SQLAlchemy and brings no real benefits so far. We do not need to query that. We can always convert to JSON later by migration script if there will ever be need to do some more complex transformations.

We validate it by json.dumps() in the views.py. The json.dumps() would fail in case you specify list there. I will write a test-case for that.

Actually, whole request data must be a json and therefore the metadata part of this is also JSON, so this should be OK.

:thumbsup:

Pull-Request has been merged by jkaluza

Metadata