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

fix: BuildConfigs.instantiateBinary().fromFile() does not time out #4899

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

manusa
Copy link
Member

@manusa manusa commented Feb 22, 2023

Description

Fix eclipse-jkube/jkube#2024

BuildConfigs.instantiateBinary().fromFile() no longer times out based on the RequestConfig default read timeout value.

This PR addresses a bug present in OperationSupport where the overridden settings for RequestConfig in the OperationContext were ignored.

The PR fixes the problem with BuildConfig by overriding the requestTimeout value for the context RequestConfig whenever a withTimeout value is provided in the context. It will also default the RequestConfig requestTimeout initial timeout to 0 which will effectively disable the client-side timeout kill we perform at OperationSupport.waitForResult():

if (getRequestConfig().getRequestTimeout() > 0) {
return future.get(getRequestConfig().getRequestTimeout() + ADDITIONAL_REQEUST_TIMEOUT, TimeUnit.MILLISECONDS);
}

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

Signed-off-by: Marc Nuri <marc@marcnuri.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@manusa manusa removed the wip label Feb 22, 2023
@manusa manusa added this to the 6.5.0 milestone Feb 28, 2023
@manusa manusa merged commit 7104c6f into fabric8io:master Feb 28, 2023
@manusa manusa deleted the fix/openshift-s2i-build branch February 28, 2023 05:58
@gsmet
Copy link

gsmet commented Mar 2, 2023

@Sgitario told me I hit that issue when deploying the Quarkus GitHub Bot to OpenShift so happy to see a fix, thanks!

@manusa
Copy link
Member Author

manusa commented Mar 2, 2023

@Sgitario told me I hit that issue when deploying the Quarkus GitHub Bot to OpenShift so happy to see a fix, thanks!

This one is especially critical for Quarkus and JKube, I'm sorry we didn't notice earlier. I'll try to release 6.5.0 next week and bump Quarkus dependency.

@shawkins
Copy link
Contributor

shawkins commented Mar 2, 2023

@manusa with the new integration test it looks like the jdk execution hangs https://github.com/fabric8io/kubernetes-client/actions/runs/4310764866/jobs/7519523533#step:5:378 - unlike the other http clients the jdk client seems very strict (or incorrect) about the expectation of the expect continue response - it will wait indefinitely if it doesn't get an expected response. It currently does not get the expected response because of the go / kuberentes issue with case sensitivity to the header value. I'm wondering if this functionality will work for jdk if we disable its support for expect continue, if not we'll want to disable these tests for jdk.

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.

Unstable OpenShift builds after bumping Kubernetes Client to 6.4
5 participants