The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Reporter::Transport::Metabase::Fallback

SYNOPSIS

    my $report = Test::Reporter->new(
        transport => 'Metabase::Fallback',
        transport_args => [
          uri     => 'http://metabase.example.com:3000/',
          id_file => '/home/jdoe/.metabase/metabase_id.json',
          File    => '/home/jdoe/.cpanreporter/reports',
        ],
    );

    # use space-separated in a CPAN::Reporter config.ini
    transport = Metabase::Fallback uri http://metabase.example.com:3000/ ... File /home/stro/reports max_files 42

DESCRIPTION

This module creates a fallback mechanism for Test::Reporter Metabase instance, combining Test::Reporter::Transport::File and Test::Reporter::Transport::Metabase functionality.

Whenever Metabase submission fails, the report file is saved locally. When the next report is successfully submitted to Metabase, all queued reports are submitted along with it.

"max_files" parameter specifies how many reports are sent from the queue during the regular submission. Default value is 25. You may want to increase it if you're running a smoker or decrease it if you don't want to wait for too long during the casual CPAN shell usage. Keep in mind that your queue is only processed when a report is being sent so if you're using CPAN shell irregularly, a small number may keep some reports sitting in a queue for a very long time.

ISSUES

If a saved report is corrupted (for example, has 0 byte length because your disk is full), it will stay in your queue forever.

If a saved report is corrupted in a way that it cannot be accepted by Metabase, you queue may stuck until you manually remove the offending file.

You probably couldn't use multiple CPAN shells at once unless you separate .cpanreporter dir for each Perl.

SUGGESTIONS

Send your suggestions through RT, to stro@cpan.org, or post to cpan-testers-discuss@perl.org mailing list.

AUTHOR

Serguei Trouchelle <stro@cpan.org>

LICENSE AND COPYRIGHT

Copyright (c) 2018 by Serguei Trouchelle

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.