Skip to content

fix: change blocking deploy API calls#102

Merged
philmtd merged 14 commits into
masterfrom
fix-blocking-deploy-calls
Feb 14, 2023
Merged

fix: change blocking deploy API calls#102
philmtd merged 14 commits into
masterfrom
fix-blocking-deploy-calls

Conversation

@philmtd
Copy link
Copy Markdown
Member

@philmtd philmtd commented Jan 19, 2023

execute deployments asynchronally to stop long blocking calls at the API level

@philmtd philmtd added bug Something isn't working java Pull requests that update Java code labels Jan 19, 2023
@philmtd philmtd enabled auto-merge (squash) January 19, 2023 15:29
@philmtd philmtd requested a review from schwerlaut January 19, 2023 15:44
Comment thread frontend/src/assets/i18n/de.json Outdated
Comment thread src/main/java/io/oneko/project/rest/ProjectController.java Outdated
Copy link
Copy Markdown
Collaborator

@schwerlaut schwerlaut left a comment

Choose a reason for hiding this comment

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

These changes look good to me.
I have a couple of thoughts on one of the controllers for you to consider prior to merging.

Comment thread src/main/java/io/oneko/project/rest/ProjectController.java Outdated
Comment thread src/main/java/io/oneko/project/rest/ProjectController.java Outdated
@philmtd philmtd requested a review from schwerlaut February 9, 2023 18:43
}

private <T> void handleImmediateAsyncExceptionWithoutBlocking(CompletableFuture<T> future) {
if (future.isCompletedExceptionally()) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If triggering the deployment fails already during initialization we might as well throw an exception synchronously.
This way we might get rid of this error-handling here, which to me look's out of place.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed.

Signed-off-by: Philip Dakowitz <dakowitz@subshell.com>
@philmtd philmtd requested a review from schwerlaut February 14, 2023 13:35
.ifPresent(versionFromDto -> version.setTemplateVariables(versionFromDto.getTemplateVariables())));
project.getVersionById(versionId)
.ifPresent(version -> dto.getVersions()
.stream()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like all this indention change modified the overall readability from "not a lot" to "still not a lot"

@philmtd philmtd merged commit 21ba098 into master Feb 14, 2023
@philmtd philmtd deleted the fix-blocking-deploy-calls branch February 14, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working java Pull requests that update Java code

Development

Successfully merging this pull request may close these issues.

2 participants