Merge pull request #1144 from DeterminateSystems/eval-event-cleanup
Eval event cleanup
This commit is contained in:
commit
3864ca820a
|
@ -55,6 +55,30 @@ After processing, the row's `notificationspendingsince` column is set to null.
|
|||
|
||||
It is possible for subsequent deliveries of the same `build_finished` data to imply different outcomes. For example, if the build fails, is restarted, and then succeeds. In this scenario the `build_finished` events will be delivered at least twice, once for the failure and then once for the success.
|
||||
|
||||
### `eval_started`
|
||||
|
||||
* **Payload:** Exactly three values, separated by the two-character string `\t` (ie: not a tab): an opaque trace ID representing this evaluation, the name of the project, and the name of the jobset.
|
||||
* **When:** At the beginning of the evaluation phase for the jobset, before any work is done.
|
||||
* **Delivery Semantics:** Ephemeral. `hydra-notify` must be running to react to this event. No record of this event is stored.
|
||||
|
||||
### `eval_added`
|
||||
|
||||
* **Payload:** Exactly two values, separated by the two-character string `\t` (ie: not a tab): an opaque trace ID representing this evaluation, and the ID of the JobsetEval record.
|
||||
* **When:** After the evaluator fetches inputs and completes the evaluation successfully.
|
||||
* **Delivery Semantics:** Ephemeral. `hydra-notify` must be running to react to this event. No record of this event is stored.
|
||||
|
||||
### `eval_cached`
|
||||
|
||||
* **Payload:** Exactly one value: an opaque trace ID representing this evaluation.
|
||||
* **When:** After the evaluator fetches inputs, if none of the inputs changed.
|
||||
* **Delivery Semantics:** Ephemeral. `hydra-notify` must be running to react to this event. No record of this event is stored.
|
||||
|
||||
### `eval_failed`
|
||||
|
||||
* **Payload:** Exactly one value: an opaque trace ID representing this evaluation.
|
||||
* **When:** After any fetching any input fails, or any other evaluation error occurs.
|
||||
* **Delivery Semantics:** Ephemeral. `hydra-notify` must be running to react to this event. No record of this event is stored.
|
||||
|
||||
## Development Notes
|
||||
|
||||
### Re-sending a notification
|
||||
|
|
|
@ -2,20 +2,20 @@ package Hydra::Event;
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Hydra::Event::CachedBuildFinished;
|
||||
use Hydra::Event::CachedBuildQueued;
|
||||
use Hydra::Event::BuildFinished;
|
||||
use Hydra::Event::BuildQueued;
|
||||
use Hydra::Event::BuildStarted;
|
||||
use Hydra::Event::CachedBuildFinished;
|
||||
use Hydra::Event::CachedBuildQueued;
|
||||
use Hydra::Event::StepFinished;
|
||||
|
||||
my %channels_to_events = (
|
||||
build_finished => \&Hydra::Event::BuildFinished::parse,
|
||||
build_queued => \&Hydra::Event::BuildQueued::parse,
|
||||
build_started => \&Hydra::Event::BuildStarted::parse,
|
||||
step_finished => \&Hydra::Event::StepFinished::parse,
|
||||
build_finished => \&Hydra::Event::BuildFinished::parse,
|
||||
cached_build_finished => \&Hydra::Event::CachedBuildFinished::parse,
|
||||
cached_build_queued => \&Hydra::Event::CachedBuildQueued::parse,
|
||||
step_finished => \&Hydra::Event::StepFinished::parse,
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ my %ctx = test_init();
|
|||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
use Hydra::Event;
|
||||
use Hydra::Event::BuildStarted;
|
||||
use Hydra::Event::StepFinished;
|
||||
|
||||
use Test2::V0;
|
||||
use Test2::Tools::Exception;
|
||||
|
|
|
@ -17,14 +17,14 @@ path_input_cache_validity_seconds = 0
|
|||
my $dbh = $ctx->db()->storage->dbh;
|
||||
my $listener = Hydra::PostgresListener->new($dbh);
|
||||
|
||||
$listener->subscribe("build_queued");
|
||||
$listener->subscribe("builds_added");
|
||||
$listener->subscribe("cached_build_finished");
|
||||
$listener->subscribe("cached_build_queued");
|
||||
$listener->subscribe("build_queued");
|
||||
$listener->subscribe("eval_failed");
|
||||
$listener->subscribe("eval_cached");
|
||||
$listener->subscribe("eval_added");
|
||||
$listener->subscribe("eval_cached");
|
||||
$listener->subscribe("eval_failed");
|
||||
$listener->subscribe("eval_started");
|
||||
$listener->subscribe("builds_added");
|
||||
|
||||
|
||||
my $jobsetdir = $ctx->tmpdir . '/jobset';
|
||||
|
|
Loading…
Reference in a new issue