Skip to content

fix: bump terraform-spring-boot-starter to 1.9.1 so stuck downloads time out (#3890) - #3904

Merged
alfespa17 merged 2 commits into
terrakube-io:mainfrom
klinux:chore/terraform-client-1.9.1
Nov 11, 2026
Merged

alfespa17 merged 2 commits into
terrakube-io:mainfrom
klinux:chore/terraform-client-1.9.1

Conversation

@klinux

@klinux klinux commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why?

Part of #3890.

This bumps terraform-spring-boot-starter in the executor from 1.9.0 to 1.9.1. That release includes terrakube-io/terraform-spring-boot#112. In 1.9.0, the download of the releases list (index.json) and of the binaries could hang forever, and the executor pod then got stuck on that job. In 1.9.1 they time out and fail the job, or fall back to the previously cached releases list:

property (io.terrakube.terraform.flags.*) default
downloadResponseTimeout (max idle time between reads) 60s
releasesDownloadTimeout (whole releases list download) 2m
binaryDownloadTimeout (whole binary download) 10m

TerraformExecutorServiceImpl builds its own JSON plan, apply and destroy clients, and until now copied only the releases URLs from the configured TerraformClient. They now copy the three timeouts as well, so an override applies to every download, not only to the main client.

The defaults apply without any configuration. To override a timeout, set its executor environment variable, wired in application.properties like CustomTerraformReleasesUrl:

environment variable property default
TerraformDownloadResponseTimeout downloadResponseTimeout 60s
TerraformReleasesDownloadTimeout releasesDownloadTimeout 2m
TerraformBinaryDownloadTimeout binaryDownloadTimeout 10m

Testing

Ran: mvn test in executor/ against terraform-spring-boot-starter 1.9.1 from Maven Central: 735 tests, 0 failures
Checked: new test jsonClientsKeepTheConfiguredReleasesUrlsAndDownloadTimeouts, which checks that the plan, apply and destroy JSON clients get the URLs and the three timeouts

🤖 Generated with Claude Code

…ime out (terrakube-io#3890)

1.9.1 adds timeouts to the releases list and binary downloads, which
could hang forever and leave the executor pod stuck on one job.

The JSON plan/apply/destroy clients built in TerraformExecutorServiceImpl
now copy the three new download timeouts from the configured client,
like they already did for the releases URLs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alfespa17 alfespa17 self-assigned this Nov 11, 2026
@alfespa17

Copy link
Copy Markdown
Member

@klinux can you include the properties to override the values if need it

example:

io.terrakube.terraform.flags.enableColor=${TerrakubeEnableColorOutput:true}

…variables

TerraformDownloadResponseTimeout (60s), TerraformReleasesDownloadTimeout (2m)
and TerraformBinaryDownloadTimeout (10m), like CustomTerraformReleasesUrl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@klinux

klinux commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Done in 44cab00. The three timeouts are now in executor/src/main/resources/application.properties, with environment variables in the same style as CustomTerraformReleasesUrl:

io.terrakube.terraform.flags.downloadResponseTimeout=${TerraformDownloadResponseTimeout:60s}
io.terrakube.terraform.flags.releasesDownloadTimeout=${TerraformReleasesDownloadTimeout:2m}
io.terrakube.terraform.flags.binaryDownloadTimeout=${TerraformBinaryDownloadTimeout:10m}

Executor tests still pass (735, 0 failures).

@klinux

klinux commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

The build-jammy failure looks like a flake, not this change. The API tests stop with no output at io.terrakube.api.WorkspaceGraphValidationServiceTests, and after ~4 minutes the job exits with code 1. The executor module, the only one this PR touches, is never built.

The same stall happened on another PR today, at the same test: https://github.com/terrakube-io/terrakube/actions/runs/42998885446 (fix/executor-null-error-output). The previous run of this branch passed, and the only change since then is three lines in the executor application.properties.

Could you re-run the failed job? I do not have rights to do it.

@alfespa17 alfespa17 added this to the 2.34.2 milestone Nov 11, 2026
@alfespa17

Copy link
Copy Markdown
Member

I tested locally and it is working good

@alfespa17
alfespa17 merged commit e6cc700 into terrakube-io:main Nov 11, 2026
1 of 3 checks passed
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.

Executor hangs forever on OutOfDirectMemoryError while fetching releases index.json (2.34, Netty 4.2)

2 participants