CPAN Testers 2.0 and the metabase-relayd

So CPAN Testers 2.0 was announced and further here.

Big kudos to all concerned

When I met David Golden and Ricardo Signes at the Birmingham QA Hackathon in 2009 and discussions were happening about Metabase and how submissions would be made to it, I'd expressed concern about the weight of the dependencies that would be required to make Metabase submissions.

I came up with the idea of a Metabase relay server, something that would act as an intermediate between smokers and the Metabase. The smokers would use an very lightweight transport to submit reports to the relay, which would then forward the requests on to the Metabase server.

And that was as far as it went until the beta testing of Metabase started. I wrote Test::Reporter::Transport::Socket which would be installed on the smoker. This takes as options the address of a relay server and the TCP port to connect to. The data is passed using Storable's nfreeze function and unfrozen at the relay.

The relay server side is dealt with by a number of parts, POE::Component::Metabase::Client::Submit, POE::Component::Metabase::Relay::Server and the easy to use metabase-relayd.

The relay server has a SQLite database backend which stores reports to be submitted, if transmission fails it will requeue and try again until submission succeeds (this is in contrast to Test::Reporter::Transport::Metabase which does not have a resubmission mechanism)

So using it. On each of the smokers install Test::Reporter::Transport::Socket.

For CPAN::Reporter add following line to ~/.cpanreporter/config.ini

transport = Socket host my.relay.server port 8080

For CPANPLUS it is slightly harder, you will have to edit the CPANPLUS config file and find the setting for cpantest_reporter_args or you could run this script to set the appropriate values for you.

On what will be your relay server simply install App::Metabase::Relayd, which should pull in all the required dependencies.

metabase-relayd uses the directory ~/.metabase for finding its configuration file relayd and for storing the database file, etc.

Unless you are an existing CPAN Tester then run metabase-profile to generate yourself a profile id file and move the resultant file into ~/.metabase.

Create a relayd file in ~/.metabase


This is my relayd adjust to taste

Then simply start metabase-relayd

Leave a comment

About bingos

user-pic System administrator, part-time Perl hacker, full-time POE [] evangelist. One day he will be made to pay for his crimes. He has some modules on CPAN []. They may or may not be useful