Skip to content

#1770: fix setup hanging due to buffered log output during license prompt#1774

Merged
hohwille merged 9 commits intodevonfw:mainfrom
shodiBoy1:bugfix/1770-fix-setup-stdout-flush
Mar 27, 2026
Merged

#1770: fix setup hanging due to buffered log output during license prompt#1774
hohwille merged 9 commits intodevonfw:mainfrom
shodiBoy1:bugfix/1770-fix-setup-stdout-flush

Conversation

@shodiBoy1
Copy link
Contributor

This PR fixes #1770

Implemented changes:

  • Moved configureJavaUtilLogging(cmd) call before ensureLicenseAgreement(cmd) in
    AbstractIdeContext.applyAndRun() so the log buffer is flushed and output is visible before the user
    is prompted for input

Checklist for this PR

  • 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

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Mar 25, 2026
@shodiBoy1 shodiBoy1 self-assigned this Mar 25, 2026
@shodiBoy1 shodiBoy1 added the bugfix PR that fixes a bug issue label Mar 25, 2026
@coveralls
Copy link
Collaborator

coveralls commented Mar 25, 2026

Pull Request Test Coverage Report for Build 23639594901

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 23 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 70.434%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/context/AbstractIdeContext.java 23 65.79%
Totals Coverage Status
Change from base Build 23639525330: -0.008%
Covered Lines: 10785
Relevant Lines: 14706

💛 - Coveralls

@shodiBoy1 shodiBoy1 marked this pull request as ready for review March 25, 2026 20:47
@shodiBoy1 shodiBoy1 requested a review from hohwille March 25, 2026 20:47
@shodiBoy1 shodiBoy1 moved this from 🆕 New to Team Review in IDEasy board Mar 25, 2026
@hohwille hohwille changed the title Bugfix/1770 fix setup hanging due to buffered log output during license prompt #1770: fix setup hanging due to buffered log output during license prompt Mar 26, 2026
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.

@shodiBoy1 thanks for your PR. You definitely found the right spot to fix this bug. Nice work 👍
However, your changes will fix the bug but IMHO cause another bug.
See #754 and all the previous issues linked from there.
Please have a look at my review comment and retest and probably rework.

BTW: IMHO we should be able to verify the bug with JUnit first and then fix it following red/green pattern so you first write a test reproducing the bug that is red, then you fix the bug and see that your test turned green now. This helps us to continuously improve our tests and ensure that bugs that we once had fixed do not show up again. BTW: currently tests skip the license agreement due to this:

private boolean ensureLicenseAgreement(Commandlet cmd) {
if (isTest()) {
return true; // ignore for tests
}

The better patttern would be to make the method protected and override it in AbstractIdeTestContext or IdeTestContext to implement the skip but leave some option to keep it active in the test. Let me know if you need further details or help on this.

@github-project-automation github-project-automation bot moved this from Team Review to 👀 In review in IDEasy board Mar 26, 2026
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.

@shodiBoy1 thanks for the update. This looks like the perfect solution now.
I still want this duplicated activation of the logging but can do that outside since it is not directly related to this bug.

@hohwille hohwille merged commit 583ec6c into devonfw:main Mar 27, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDEasy board Mar 27, 2026
@hohwille hohwille added this to the release:2026.04.001 milestone Mar 27, 2026
laert-ll pushed a commit to laert-ll/IDEasy that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

IDEasy setup is broken

3 participants