-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: retry and uniqid #127
Conversation
@@ -490,7 +490,7 @@ function cleanUp(Orchestration $orchestration, Table $activeRuntimes, array $net | |||
->action(function (string $runtimeId, string $image, string $entrypoint, string $source, string $destination, string $outputDirectory, array $variables, string $runtimeEntrypoint, string $command, int $timeout, bool $remove, float $cpus, int $memory, string $version, string $restartPolicy, array $networks, Orchestration $orchestration, Table $activeRuntimes, Response $response, Log $log) { | |||
$runtimeName = System::getHostname() . '-' . $runtimeId; | |||
|
|||
$runtimeHostname = \uniqid(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets check for more occurances, I think I saw multiplr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one more usage in the build path name, but I don't think it's an issue with collision / or worth increasing the scope of this PR to address immediate function errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Lets document these new env vars in the readme and we can merge
\bin2hex(\random_bytes(16))
instead of\uniqid()
for a more unique and secure identifier.activeRuntime
extra to sentry to aid debuggingCURLE_COULDNT_RESOLVE_HOST
(6), andCURLE_COULDNT_CONNECT
(7). The loop retries until successful or until the timeout is reached.