dlespiau / patchwork

The freedesktop.org edition of patchwork. Patchwork is a web patch tracking system for projects using a mailing list for contributions and reviews.
http://patchwork-freedesktop.readthedocs.org/en/latest/
GNU General Public License v2.0
22 stars 13 forks source link

Patchwork could store test logs server side #110

Open lsandov1 opened 8 years ago

lsandov1 commented 8 years ago

Log coming from tests should be store into DB

Ideas

The system should be able to store the logs coming from the tests done for specific series. There are two possible ways to do this

  1. Adding another field in the JSON POST request

    POST /api/1.0/series/47/test-results/ HTTP/1.1

    { "test_name": "checkpatch.pl", "state": "success", "url": "", "summary": "total: 0 errors, 0 warnings, 10 lines checked" "log": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }

  2. Allowing another post route to accept the following request

    POST /api/1.0/series/47/test-results/log HTTP/1.1

    { "log": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }

Option 1 looks a bit redundant to have two fields (url and log) containing the same content. Option 2 is perhaps cleaner but users needs to do a second request, affecting the user experience and perhaps hitting the server performance.

Some related questions: can users post a log of any side? should log be stored into the DB, or just in the filesystem and server just need to store the filename?

Refefences

dlespiau commented 8 years ago

'url' and 'log' fields are redundant, but because they are all optional, it doesn't really matter. The user can decide what they want to do for their test results, either link to the logs, which can be a link to a complex system, or upload a log file, or both if that makes any sense for that project.

Other observations: