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

RawCustomResourceOperationsImpl ignores config #2687

Closed
manusa opened this issue Dec 22, 2020 · 0 comments · Fixed by #2721
Closed

RawCustomResourceOperationsImpl ignores config #2687

manusa opened this issue Dec 22, 2020 · 0 comments · Fixed by #2721
Assignees
Labels
Milestone

Comments

@manusa
Copy link
Member

manusa commented Dec 22, 2020

Description

RawCustomResourceOperationsImpl hides the OperationSupport protected final Config field by declaring a field with the same name (same applies to a few other fields).

Since the field is hidden and the constructor is not propagating the variable to the super class by invoking the super(...) method, any call to getConfig() from within this class to return null.

Thus, some of the following configurations never apply:

OkHttpClient.Builder clonedClientBuilder = client.newBuilder();
clonedClientBuilder.readTimeout(getConfig() != null ?
getConfig().getWebsocketTimeout() : Config.DEFAULT_WEBSOCKET_TIMEOUT, TimeUnit.MILLISECONDS);
clonedClientBuilder.pingInterval(getConfig() != null ?
getConfig().getWebsocketPingInterval() : Config.DEFAULT_WEBSOCKET_PING_INTERVAL, TimeUnit.MILLISECONDS);

watch = new RawWatchConnectionManager(
clonedOkHttpClient, watchUrlBuilder, options, objectMapper, watcher,
getConfig() != null ? getConfig().getWatchReconnectLimit() : -1,
getConfig() != null ? getConfig().getWatchReconnectInterval() : 1000,
5);

return new RawWatchConnectionManager(
clonedOkHttpClient, watchUrlBuilder, options, objectMapper, watcher,
getConfig() != null ? getConfig().getWatchReconnectLimit() : -1,
getConfig() != null ? getConfig().getWatchReconnectInterval() : 1000,
5);

Relates to #2688

@manusa manusa added the bug label Dec 22, 2020
@manusa manusa added this to the 5.0.1 milestone Dec 22, 2020
@rohanKanojia rohanKanojia self-assigned this Jan 13, 2021
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jan 13, 2021
…Config

Removed colliding variables from parent OperationSupport class and added
a call to super in constructor
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jan 13, 2021
…Config

Removed colliding variables from parent OperationSupport class and added
a call to super in constructor
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jan 15, 2021
…Config

Removed colliding variables from parent OperationSupport class and added
a call to super in constructor
manusa pushed a commit that referenced this issue Jan 18, 2021
Removed colliding variables from parent OperationSupport class and added
a call to super in constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants