Skip to content

Commit 97176c3

Browse files
authored
Merge pull request #225 from open-runtimes/feat/upgrade-fetch-0.5
Upgrade utopia-php/fetch from 0.4 to 0.5
2 parents 72995b6 + ae288b8 commit 97176c3

File tree

5 files changed

+36
-59
lines changed

5 files changed

+36
-59
lines changed

app/controllers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
->param('remove', false, new Boolean(), 'Remove a runtime after execution.', true)
6565
->param('cpus', 1, new FloatValidator(true), 'Container CPU.', true)
6666
->param('memory', 512, new Integer(), 'Container RAM memory.', true)
67-
->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5') ?? 'v5')), 'Runtime Open Runtime version.', true)
67+
->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5'))), 'Runtime Open Runtime version.', true)
6868
->param('restartPolicy', DockerAPI::RESTART_NO, new WhiteList([DockerAPI::RESTART_NO, DockerAPI::RESTART_ALWAYS, DockerAPI::RESTART_ON_FAILURE, DockerAPI::RESTART_UNLESS_STOPPED], true), 'Define restart policy for the runtime once an exit code is returned. Default value is "no". Possible values are "no", "always", "on-failure", "unless-stopped".', true)
6969
->inject('response')
7070
->inject('runner')
@@ -155,7 +155,7 @@
155155
->param('variables', [], new AnyOf([new Text(65535), new Assoc()], AnyOf::TYPE_MIXED), 'Environment variables passed into runtime.', true)
156156
->param('cpus', 1, new FloatValidator(true), 'Container CPU.', true)
157157
->param('memory', 512, new Integer(true), 'Container RAM memory.', true)
158-
->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5') ?? 'v5')), 'Runtime Open Runtime version.', true)
158+
->param('version', 'v5', new WhiteList(\explode(',', System::getEnv('OPR_EXECUTOR_RUNTIME_VERSIONS', 'v5'))), 'Runtime Open Runtime version.', true)
159159
->param('runtimeEntrypoint', '', new Text(1024, 0), 'Commands to run when creating a container. Maximum of 100 commands are allowed, each 1024 characters long.', true)
160160
->param('logging', true, new Boolean(true), 'Whether executions will be logged.', true)
161161
->param('restartPolicy', DockerAPI::RESTART_NO, new WhiteList([DockerAPI::RESTART_NO, DockerAPI::RESTART_ALWAYS, DockerAPI::RESTART_ON_FAILURE, DockerAPI::RESTART_UNLESS_STOPPED], true), 'Define restart policy once exit code is returned by command. Default value is "no". Possible values are "no", "always", "on-failure", "unless-stopped".', true)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"utopia-php/console": "0.0.*",
2929
"utopia-php/di": "0.3.*",
3030
"utopia-php/dsn": "0.2.*",
31-
"utopia-php/fetch": "0.4.*",
31+
"utopia-php/fetch": "0.5.*",
3232
"utopia-php/framework": "0.34.*",
3333
"utopia-php/orchestration": "0.19.*",
3434
"utopia-php/preloader": "0.2.*",

composer.lock

Lines changed: 30 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Executor/Runner/Docker.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public function getLogs(string $runtimeId, int $timeout, Response $response): vo
150150
Console::execute('tail -F ' . $tmpLogging . '/timings.txt', '', $output, $timeout, function (string $timingChunk, mixed $process) use ($tmpLogging, &$logsChunk, &$logsProcess, &$datetime, &$offset, $introOffset): void {
151151
$logsProcess = $process;
152152

153-
if (!\file_exists($tmpLogging . '/logs.txt')) {
153+
$logsPath = $tmpLogging . '/logs.txt';
154+
if (!\file_exists($logsPath)) {
154155
if (!empty($logsProcess)) {
155156
\proc_terminate($logsProcess, 9);
156157
}

tests/e2e/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function call(string $method, string $path = '', array $headers = [], arr
3333
$url = $this->endpoint . $path;
3434

3535
$client = new FetchClient();
36-
$client->setTimeout(60);
36+
$client->setTimeout(60000);
3737

3838
foreach ($this->baseHeaders as $key => $value) {
3939
$client->addHeader($key, $value);

0 commit comments

Comments
 (0)