Skip to content

Commit

Permalink
fix #4853: adding another wait for log operations
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins authored and manusa committed Feb 9, 2023
1 parent d3922b5 commit 849a4f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#### Improvements
* Fix #4747: migrate to SnakeYAML Engine
* Fix #4853: adding a wait on the pod for log operations
* Fix #4800: (java-generator) Reflect the `scope` field when implementing the `Namespaced` interface
* Fix #4739: honor optimistic concurrency control semantics in the mock server for `PUT` and `PATCH` requests.
* Fix #4644: generate CRDs in parallel and optimize code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public PodOperationContext getContext() {
protected <T> T doGetLog(Class<T> type) {
try {
URL url = new URL(URLUtils.join(getResourceUrl().toString(), podOperationContext.getLogParameters()));

PodOperationUtil.waitUntilReadyOrSucceded(this,
getContext().getReadyWaitTimeout() != null ? getContext().getReadyWaitTimeout() : DEFAULT_POD_READY_WAIT_TIMEOUT);

return handleRawGet(url, type);
} catch (IOException ioException) {
throw KubernetesClientException.launderThrowable(forOperationType("doGetLog"), ioException);
Expand Down Expand Up @@ -429,7 +433,7 @@ public InputStream read() {
}

private String[] readFileCommand(String source) {
return new String[] { "sh", "-c", String.format("cat %s | base64", shellQuote(source)) };
return new String[] { "sh", "-c", String.format("base64 %s", shellQuote(source)) };
}

private InputStream readFile(String source) {
Expand Down

0 comments on commit 849a4f6

Please sign in to comment.