Skip to content

Commit

Permalink
Maintenance: update proto submodule; improve RoadRunner starting de…
Browse files Browse the repository at this point in the history
…tection (#283)
  • Loading branch information
roxblnfk authored Feb 2, 2023
1 parent fe0c2e0 commit 55e8705
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion proto
Submodule proto updated 42 files
+1 −1 .buildkite/Dockerfile
+1 −1 .github/CODEOWNERS
+2 −6 .github/PULL_REQUEST_TEMPLATE.md
+29 −0 .github/workflows/trigger-api-go-update.yml
+8 −8 Makefile
+5 −10 buf.yaml
+7 −0 build/go.mod
+5 −0 build/go.sum
+29 −0 build/tools.go
+6 −0 go.mod
+89 −0 temporal/api/batch/v1/message.proto
+24 −3 temporal/api/command/v1/message.proto
+2 −2 temporal/api/common/v1/message.proto
+47 −0 temporal/api/enums/v1/batch_operation.proto
+4 −2 temporal/api/enums/v1/command_type.proto
+3 −2 temporal/api/enums/v1/common.proto
+18 −2 temporal/api/enums/v1/event_type.proto
+31 −2 temporal/api/enums/v1/failed_cause.proto
+2 −2 temporal/api/enums/v1/namespace.proto
+2 −2 temporal/api/enums/v1/query.proto
+5 −3 temporal/api/enums/v1/reset.proto
+60 −0 temporal/api/enums/v1/schedule.proto
+2 −2 temporal/api/enums/v1/task_queue.proto
+56 −0 temporal/api/enums/v1/update.proto
+5 −2 temporal/api/enums/v1/workflow.proto
+23 −5 temporal/api/errordetails/v1/message.proto
+20 −2 temporal/api/failure/v1/message.proto
+2 −2 temporal/api/filter/v1/message.proto
+158 −22 temporal/api/history/v1/message.proto
+17 −2 temporal/api/namespace/v1/message.proto
+64 −4 temporal/api/operatorservice/v1/request_response.proto
+27 −5 temporal/api/operatorservice/v1/service.proto
+57 −0 temporal/api/protocol/v1/message.proto
+2 −2 temporal/api/query/v1/message.proto
+13 −2 temporal/api/replication/v1/message.proto
+379 −0 temporal/api/schedule/v1/message.proto
+25 −2 temporal/api/taskqueue/v1/message.proto
+111 −0 temporal/api/update/v1/message.proto
+2 −2 temporal/api/version/v1/message.proto
+29 −2 temporal/api/workflow/v1/message.proto
+384 −3 temporal/api/workflowservice/v1/request_response.proto
+93 −5 temporal/api/workflowservice/v1/service.proto
17 changes: 13 additions & 4 deletions testing/src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,26 @@ public function startRoadRunner(string $rrCommand = null, int $commandTimeout =
$this->roadRunnerProcess->setTimeout($commandTimeout);

$this->output->write('Starting RoadRunner... ');
$this->roadRunnerProcess->start();
$roadRunnerStarted = false;
$this->roadRunnerProcess->start(static function ($type, $output) use (&$roadRunnerStarted) {
if ($type === Process::OUT && \str_contains($output, 'RoadRunner server started')) {
$roadRunnerStarted = true;
}
});

if (!$this->roadRunnerProcess->isRunning()) {
$this->output->writeln('<error>error</error>');
$this->output->writeln('Error starting RoadRunner: ' . $this->roadRunnerProcess->getErrorOutput());
exit(1);
}

$roadRunnerStarted = $this->roadRunnerProcess->waitUntil(
fn($type, $output) => strpos($output, 'RoadRunner server started') !== false
);
// wait for roadrunner to start
$ticks = $commandTimeout * 10;
while (!$roadRunnerStarted && $ticks > 0) {
$this->roadRunnerProcess->getStatus();
\usleep(100000);
--$ticks;
}

if (!$roadRunnerStarted) {
$this->output->writeln('<error>error</error>');
Expand Down

0 comments on commit 55e8705

Please sign in to comment.