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

#315: Fix frozen process after global tool installation with msiexec #684

Merged
merged 12 commits into from
Nov 11, 2024

Conversation

alfeilex
Copy link
Member

@alfeilex alfeilex commented Oct 9, 2024

Fixes: #315

This PR adds an argument for msiexec to install msi files. With /qb the installation requires no user interaction, but there is still a UI to see the progress of the installation. This way the process no longer freeze

This PR change the installation process of global tools so that they are run in the background.

Affected tools: docker, pgadmin

@coveralls
Copy link
Collaborator

coveralls commented Oct 9, 2024

Pull Request Test Coverage Report for Build 11783435816

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 21 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 67.195%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/tool/GlobalToolCommandlet.java 21 2.02%
Totals Coverage Status
Change from base Build 11783359749: 0.0%
Covered Lines: 6376
Relevant Lines: 9145

💛 - Coveralls

@alfeilex alfeilex marked this pull request as ready for review October 10, 2024 10:35
@alfeilex alfeilex self-assigned this Oct 15, 2024
@alfeilex alfeilex changed the title #315: Fix frozen process after MSI installation #315: Fix frozen process after global MSI tool installation Oct 15, 2024
@alfeilex alfeilex changed the title #315: Fix frozen process after global MSI tool installation #315: Fix frozen process after global tool installation with msiexec Oct 15, 2024
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alfeilex thanks for testing, filing bug and creating PR (including CHANGELOG update) 👍
I left a comment with an alternative suggestion to fix this.
If you agree, please update the PR.
In case you disagree, we could at least explain and document more about why we magically add this /qb option.

@hohwille hohwille self-assigned this Oct 18, 2024
@hohwille hohwille added this to the release:2024.11.001 milestone Oct 28, 2024
@alfeilex
Copy link
Member Author

alfeilex commented Oct 29, 2024

If the installation process of global tools should happen in the background, then this implementation doesn't make sense, does it? We are waiting for an exit code to proceed but if the setup is done by the user in the background, the IDE should output something like Setup of <tool> started. without any success or error output. But what are we doing with postInstall(). Is it even necessary for a global tool when the user is handling the entire installation?

But it probably makes sense, as the global installation varies across operating systems.

Ultimately, switching to ProcessMode.Background might be the only fix we need for this issue

int exitCode = pc.run();
if (tmpDir != null) {
fileAccess.delete(tmpDir);
}
if (exitCode == 0) {
this.context.success("Successfully installed {} in version {}", this.tool, resolvedVersion);
} else {
this.context.warning("{} in version {} was not successfully installed", this.tool, resolvedVersion);
return false;
}
postInstall();
return true;
}

@alfeilex
Copy link
Member Author

But what are we doing with postInstall()

@hohwille
Copy link
Member

Created issue #751 for the discussed improvements.
Merging now.

@hohwille hohwille merged commit af3c4ef into devonfw:main Nov 11, 2024
4 checks passed
@alfeilex alfeilex deleted the #315-bugfixDocker branch November 11, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Process stays hanging after installing Docker
4 participants