Closed preaction closed 7 years ago
This work is started on the metabase-api branch. The initial metabase shim API for submitting new reports is complete, but must be tested against live clients.
We also need to create a basic web page that indicates what this site is and that users should use different APIs for this...
This is done enough for a public beta at http://metabase-beta.cpantesters.org. Any future problems in testing will be resolved in individual tickets.
While we transition away from the Metabase project to a simpler way of storing raw reports, we will need a backwards-compatible way for existing clients to still submit reports. This API should write directly to the local CPAN Testers cache of the Metabase for the time being, until we figure out that simpler way of storing raw reports.
This shim API should function as a Metabase::Gateway by mimicking the REST API provided by Metabase::Web.
It must be able to:
/tail/log.txt
with a text log of the last 1000 reports[2017-03-05T21:54:51Z] [Chris Williams (BINGOS)] [pass] [PLICEASE/Alien-Build-0.19.tar.gz] [x86_64-gnukfreebsd] [perl-v5.14.0] [5c074038-01ee-11e7-a074-e1beba07c9dd] [2017-03-05T21:54:51Z]
[<updated time in ISO8601>] [<tester from>] [<grade>] [<distfile>] [<archname>] [<perl version>] [<guid>] [<created time in ISO8601>]
When a report is submitted directly to the local cache, it will have a GUID, but not an ID (which gets added when the report is parsed into the
cpanstats
table by CPAN::Testers::Data::Generator). In order for this new shim API to work, we will need to alter CPAN::Testers::Data::Generator by:id
field in themetabase
table to beNULL
generate
method of CPAN::Testers::Data::Generator determine the work it needs to do by selecting all the rows in themetabase
where theid
field isNULL
generate
method of CPAN::Testers::Data::Generator update theid
field of themetabase
table with the correct ID generated by inserting into thecpanstats
tableThis is the main API to submitting reports, so it is important that it is as robust as possible. All care should be taken that it does not go down, and it should be tested thoroughly before being put into production.