Skip to content
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

Conversation

okolesn
Copy link
Collaborator

@okolesn okolesn commented Jul 1, 2024

@okolesn okolesn requested a review from SilinPavel July 1, 2024 10:58
try {
Assert.notNull(containerId,
messageHelper.getMessage(MessageConstants.ERROR_CONTAINER_ID_FOR_RUN_NOT_FOUND, run.getId()));
final String getSizeCommand = DockerContainerLayersCommand.builder()
Copy link
Member

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()))) {
Copy link
Member

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(
Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be final

okolesn added 4 commits July 2, 2024 12:42
…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
@SilinPavel SilinPavel force-pushed the Issue_3573_Introduce_hard/soft_limits_for_commiting_run_and_run_tool/pipeline branch 3 times, most recently from 422d5b5 to c4a235c Compare July 3, 2024 10:07
@SilinPavel SilinPavel force-pushed the Issue_3573_Introduce_hard/soft_limits_for_commiting_run_and_run_tool/pipeline branch from c4a235c to f90bde5 Compare July 3, 2024 10:11
@SilinPavel SilinPavel merged commit d2afc12 into develop Jul 8, 2024
4 checks passed
SilinPavel pushed a commit that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants