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

The scripts should expose an option to increase the timeout #567

Open
bmuschko opened this issue Feb 14, 2024 · 3 comments
Open

The scripts should expose an option to increase the timeout #567

bmuschko opened this issue Feb 14, 2024 · 3 comments

Comments

@bmuschko
Copy link

Under certain conditions (e.g. a lot of data, CPU load on Develocity server), uploaded build scans can take a while to fully process. During the last step "Merge build results", the previously-uploaded build scans cannot be retrieved. I believe the retrieval process has a timeout of 10 seconds by default. Allow the end user to provide a custom timeout to work around this issue e.g. via --timeout.

@runningcode
Copy link
Member

Hi @bmuschko, does editing connect.timeout or the read.timeout lines in the network.settings file help for this use case or are you asking for something else?

@bmuschko
Copy link
Author

Ah, I didn't even notice that file before. Thanks for pointing me to it. That'll do.

@erichaagdev
Copy link
Member

There are three timeouts to consider here.

The first two are the connect.timeout and read.timeout. They only control the connect and read timeouts of the underlying OkHttpClient.

private void configureTimeouts(OkHttpClient.Builder httpClientBuilder) {
Duration connectTimeout = parseTimeout("connect.timeout");
if (connectTimeout != null) {
httpClientBuilder.connectTimeout(connectTimeout);
}
Duration readTimeout = parseTimeout("read.timeout");
if (readTimeout != null) {
httpClientBuilder.readTimeout(readTimeout);
}
}

The third timeout to consider is the time we wait for the build scans to be available. This is controlled by the availabilityWaitTimeoutSecs query parameter included in the call to the Develocity API. Currently, this value is always hardcoded to 10 seconds and is not configurable. In conditions where Develocity is under load and there is a delay in build scan processing you could encounter the issue you're describing.

To say this differently, regardless of the values of connect.timeout or read.timeout, the scripts will only ever wait for a maximum of 10 seconds for the build scans to ingest.

I think this is a valid issue and will reopen it.

@erichaagdev erichaagdev reopened this Feb 15, 2024
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

No branches or pull requests

3 participants