Skip to content

/usr/bin/ddev describe --json-output with invalid .ddev/config.yaml hangs IDE for long periods #439

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

Closed
1 of 2 tasks
ProxiBlue opened this issue May 19, 2025 · 7 comments
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@ProxiBlue
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Are you sure that this bug is related to this DDEV Integration Plugin?

  • I am sure

Enter your error report ID (If available)

No response

Describe the bug

IDE hangs when config.xml enters a state where it contains errors, making it near impossible to edit and fix issue.
Hangs seem to be for about 2/3 minutes at a time, complete lockout.

12:45 $ /usr/bin/ddev describe --json-output
{"level":"fatal","msg":"\u001b[31mFailed to describe project(s): /home/lucas/workspace/uptactics/site/.ddev/config.yaml exists but cannot be read. It may be invalid due to a syntax error: unable to load config file /home/lucas/workspace/uptactics/site/.ddev/config.yaml: invalid configuration in /home/lucas/workspace/uptactics/site/.ddev/config.yaml: yaml: line 27: could not find expected ':'\u001b[0m","time":"2025-05-19T12:45:50+08:00"}
de.php_perfect.intellij.ddev.cmd.CommandFailedException: Command '/usr/bin/ddev describe --json-output' returned non zero exit code {exitCode=1, timeout=false, cancelled=false, stdout=, stderr={"level":"fatal","msg":"\u001b[31mFailed to describe project(s): /home/lucas/workspace/uptactics/site/.ddev/config.yaml exists but cannot be read. It may be invalid due to a syntax error: unable to load config file /home/lucas/workspace/uptactics/site/.ddev/config.yaml: invalid configuration in /home/lucas/workspace/uptactics/site/.ddev/config.yaml: yaml: line 27: could not find expected ':'\u001b[0m","time":"2025-05-19T12:44:40+08:00"}
}
	at de.php_perfect.intellij.ddev.cmd.DdevImpl.execute(DdevImpl.java:74)
	at de.php_perfect.intellij.ddev.cmd.DdevImpl.describe(DdevImpl.java:39)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.checkDescription(DdevStateManagerImpl.java:155)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.lambda$updateConfiguration$1(DdevStateManagerImpl.java:67)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.checkChanged(DdevStateManagerImpl.java:90)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.updateConfiguration(DdevStateManagerImpl.java:65)
	at de.php_perfect.intellij.ddev.state.StateWatcherImpl.lambda$startWatching$0(StateWatcherImpl.java:33)
	at com.intellij.util.concurrency.Propagation$capturePropagationContext$$inlined$Runnable$1.run(Runnable.kt:17)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:275)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Steps to reproduce

  1. Create a new project with a working ddev config, and initiate a git repo on that folder, commit all files as usual to the new git repo. Lets assume initial branch name is 'main'
  2. Branch to a new branch and make an edit to the config.xml file, commit that change in the branch
  3. go back to the original branch 'main'
  4. create another branch, and make an edit on same line that the first branch was done, but something different (change a value)
  5. Go back to first initial branch
  6. Merge in the first vreated branch, and commit changes.
  7. Merge in teh 2nd branch.

The IDE now freezes due to a conflict appearing in the config.xml file.
Due to freeze it is near imposible to fix, and another editor has to be used to fix issue

I did all that on CLI using linux. I don;t use the IDE built in git functionality (just like the cli for more control)

Additional context

No response

@ProxiBlue ProxiBlue added the bug Something isn't working label May 19, 2025
@stasadev
Copy link
Member

Hi @ProxiBlue,

I did all that on CLI using linux.

Please provide the exact commands you ran for easier reproduction.
I tested in on my machine and I don't see any hanging.

Enter your error report ID (If available)

Provide a report ID, it may contain some useful info about your IDE.

config.xml

You probably mean .ddev/config.yaml ?


Workaround is to disable "Watch DDEV state in background":

Image

@ProxiBlue
Copy link
Author

Sure, let me setup a test repo and reproduce

I am working on an adobe commerce project, large codebase, so maybe that is related. I will try reproduce on a smaller repo (demo one) and point you to it if I can reproduce

@rfay rfay changed the title /usr/bin/ddev describe --json-output with invalid config.xml hangs IDE for long periods /usr/bin/ddev describe --json-output with invalid .ddev/config.yaml hangs IDE for long periods May 19, 2025
@rfay
Copy link
Member

rfay commented May 19, 2025

I recommend that you fix your .ddev/config.yaml rather than filing an issue against ddev-intellij-plugin. We're happy to help you with that. I don't think there are any DDEV accessories that are intended to be able to solve every problem with a broken DDEV project.

@AkibaAT
Copy link
Collaborator

AkibaAT commented May 19, 2025

I do recommend disabling the DDEV state watching in the project with a broken config.yaml as well. Because the plugin will try to fetch the status regularly, producing a new exception at each attempt.

Towards the UI freeze itself, this is a potential issue with one of the terminal executers in the plugin running in the UI context.
I have adapted the shell executer in the PR #435. You could try with that plugin version and report back if the UI freeze still happens.

@ProxiBlue
Copy link
Author

I recommend that you fix your .ddev/config.yaml rather than filing an issue against ddev-intellij-plugin. We're happy to help you with that. I don't think there are any DDEV accessories that are intended to be able to solve every problem with a broken DDEV project.

Well, the issue is that when you swap working bracnhes with GIT, and merge code down from feature-branches into a main branch, the config can be altered. edge case, yes, but it locked my entire IDE to the point I had to hard kill

figured it would be something worth looking at, but if you feel it is not, i'll just close and move on. Is not like it happens frequently,

Fixing the config requires external editors to be used, as IDE is inoperable duiring that fact

The issue having been merge conflicts.

Image

@ProxiBlue
Copy link
Author

Towards the UI freeze itself, this is a potential issue with one of the terminal executers in the plugin running in the UI context.

not using terminals in the IDE, but will give it a try as well.

@github-project-automation github-project-automation bot moved this from New to Done in Development May 19, 2025
@AkibaAT
Copy link
Collaborator

AkibaAT commented May 19, 2025

Towards the UI freeze itself, this is a potential issue with one of the terminal executers in the plugin running in the UI context.

not using terminals in the IDE, but will give it a try as well.

The plugin does automatic calls to DDEV, those are what I meant. Nothing you trigger manually.
And in the current version, they can potentially be blocking the UI if they take an exceedingly long time to return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants