-
Notifications
You must be signed in to change notification settings - Fork 59
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
Issue 3573 - Introduce hard/soft limits for commiting run and run tool/pipeline #3587
Issue 3573 - Introduce hard/soft limits for commiting run and run tool/pipeline #3587
Conversation
try { | ||
Assert.notNull(containerId, | ||
messageHelper.getMessage(MessageConstants.ERROR_CONTAINER_ID_FOR_RUN_NOT_FOUND, run.getId())); | ||
final String getSizeCommand = DockerContainerLayersCommand.builder() |
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.
Now, when we use this class in several situations, not only to get layers, I think it would be right to rename it. How about SimpleDockerContainerCommand
since it basically can be any command that doesn't have other parameters except containerId
and scriptUrl
?
.getCommand(); | ||
Process sshConnection = submitCommandViaSSH(run.getInstance().getNodeIP(), getSizeCommand, | ||
getSshPort(run)); | ||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(sshConnection.getInputStream()))) { |
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.
I think we need to wait with sshConnection.waitFor
then check for success before collecting an output, because this collecting is blocking operation and we can have a risk to block here forever
final String result = reader.lines().collect(Collectors.joining()); | ||
size = Long.parseLong(result); | ||
} | ||
boolean isFinished = sshConnection.waitFor( |
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.
can be final
.containerId(containerId) | ||
.build() | ||
.getCommand(); | ||
Process sshConnection = submitCommandViaSSH(run.getInstance().getNodeIP(), getSizeCommand, |
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.
can be final
…l/pipeline - fix remarks
…l/pipeline - preferences values in bytes + commit check result data structure change
…l/pipeline - preferences values in bytes + commit check result data structure change
…l/pipeline - preferences values in bytes + commit check result data structure change
422d5b5
to
c4a235c
Compare
c4a235c
to
f90bde5
Compare
…_3573_Introduce_hard/soft_limits_for_commiting_run_and_run_tool/pipeline
Introduce hard/soft limits for commiting run and run tool/pipeline #3573