Skip to content

Conversation

@hohwille
Copy link
Member

@hohwille hohwille commented Dec 7, 2025

This PR fixes #1640

Implemented changes:

  • remove post-install hook from terraform
  • users can still manually install auto-completion
  • implemented suggested mechanism to detect if postInstall* is calling runTool with the initial ToolInstallRequest and skip install in such case.
  • track ToolInstallRequest.parent and detect installation loop to prevent further disasters.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@hohwille hohwille added this to the release:2025.12.001 milestone Dec 7, 2025
@hohwille hohwille self-assigned this Dec 7, 2025
@hohwille hohwille added terraform Terraform infrastructure as code tool install installation process of IDE + tools and install commandlet dependencies dependencies.json (if tool A requires tool B) labels Dec 7, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Dec 7, 2025
@hohwille hohwille moved this from 🆕 New to 👀 In review in IDEasy board Dec 7, 2025
@coveralls
Copy link
Collaborator

coveralls commented Dec 7, 2025

Pull Request Test Coverage Report for Build 20007987212

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 108 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.08%) to 69.924%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/tool/terraform/Terraform.java 1 66.67%
com/devonfw/tools/ide/tool/ToolInstallRequest.java 16 69.91%
com/devonfw/tools/ide/log/IdeLogExceptionDetails.java 26 29.58%
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 26 80.68%
com/devonfw/tools/ide/tool/ToolCommandlet.java 39 75.94%
Totals Coverage Status
Change from base Build 20007338019: -0.08%
Covered Lines: 10049
Relevant Lines: 13810

💛 - Coveralls

@hohwille
Copy link
Member Author

hohwille commented Dec 7, 2025

tested with old Terraform implementation:

Preventing infinity loop during installation of terraform@1.14.1[*]
java.lang.RuntimeException
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:207)
	at com.devonfw.tools.ide.tool.terraform.Terraform.postInstallOnNewInstallation(Terraform.java:32)
	at com.devonfw.tools.ide.tool.ToolCommandlet.postInstall(ToolCommandlet.java:375)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.doInstallStep(LocalToolCommandlet.java:119)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.doInstall(LocalToolCommandlet.java:86)
	at com.devonfw.tools.ide.tool.ToolCommandlet.install(ToolCommandlet.java:281)
	at com.devonfw.tools.ide.commandlet.InstallCommandlet.run(InstallCommandlet.java:84)
	at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:1173)

Without --debug option the exception is not shown.

@hohwille hohwille merged commit 4779969 into devonfw:main Dec 8, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDEasy board Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies dependencies.json (if tool A requires tool B) install installation process of IDE + tools and install commandlet terraform Terraform infrastructure as code tool

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

StackOverflowError: Infinity loop whilst installing terraform

2 participants