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

Improve normalization close error message #19829

Merged
merged 19 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d132d9a
Improve normalization close error message
jdpgrailsdev Nov 28, 2022
50da2f8
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 28, 2022
d7f6713
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 28, 2022
f61410b
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 28, 2022
e495101
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 28, 2022
99ef512
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 28, 2022
6afb659
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
06a27be
Formatting
jdpgrailsdev Nov 29, 2022
d58cf8f
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
8814859
Better error message
jdpgrailsdev Nov 29, 2022
dac466e
Merge branch 'jonathan/improve-normalization-close-error-msg' of gith…
jdpgrailsdev Nov 29, 2022
3d5f851
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
7ee6586
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
3acc492
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
e40d052
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
93cb21d
Update log level
jdpgrailsdev Nov 29, 2022
2c568f8
Merge branch 'master' into jonathan/improve-normalization-close-error…
jdpgrailsdev Nov 29, 2022
e697c70
Fix issue with rebase
jdpgrailsdev Nov 29, 2022
3083126
Merge branch 'jonathan/improve-normalization-close-error-msg' of gith…
jdpgrailsdev Nov 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,20 @@ public void close() throws Exception {
return;
}

LOGGER.debug("Closing normalization process");
LOGGER.debug("Terminating normalization process {}...", process.pid());
jdpgrailsdev marked this conversation as resolved.
Show resolved Hide resolved
WorkerUtils.gentleClose(process, 1, TimeUnit.MINUTES);
if (process.isAlive() || process.exitValue() != 0) {
throw new WorkerException("Normalization process wasn't successful");

/*
* After attempting to close the process check the following:
*
* Did the process actually terminate? If "yes", did it do so nominally?
*/
if (process.isAlive()) {
throw new WorkerException("Normalization process " + process.pid() + " did not terminate after 1 minute.");
} else if (process.exitValue() != 0) {
throw new WorkerException("Normalization process " + process.pid() + " did not terminate normally (exit code: " + process.exitValue() + ")");
} else {
LOGGER.debug("Normalization process {} successfully terminated.", process.pid());
jdpgrailsdev marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import io.airbyte.commons.exceptions.ConfigErrorException;
import io.airbyte.commons.exceptions.ConnectionErrorException;
import io.airbyte.commons.io.IOs;
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.lang.Exceptions.Procedure;
Expand Down