-
Notifications
You must be signed in to change notification settings - Fork 206
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
In Codespaces, workspace symbols sometimes are empty. #1012
Comments
https://github.com/microsoft/vscode-spring-boot-dashboard/actions/runs/4448736100/jobs/7811943881 might be related.
Dashboard polls for workspace symbols until the result is not empty. The failure is proabably because of the same issue. |
Looks like this problem occurs (more or less) randomly, right? Hard to say what is going wrong here, but we should definitely get to the bottom of it. My initial guess is that the initialization sequence between the Java tooling and the Spring tooling is the root cause of this. The classpath listener mechanism is relatively complex and might be a source for race conditions, but it would be good to verify this assumption somehow before diving deeper here. |
Yes. It occurs randomly for Codespaces, seldom on my local machine, always on GitHub action's Windows agent (recently since Mar.17, see status of recent commits in dashboard's repo, no ideas so far).
Might be. My gut feeling is the less powerful the machine is, the more like the issue occurs. |
It's probably due to [email protected], which is released on Mar.17. And from the logs I find last success was using [email protected]. Another proof is, in microsoft/vscode-spring-boot-dashboard#299 , when I forced to use [email protected] , it worked again. //cc @testforstephen @jdneo @rgrunber @CsCherrYY for awareness. |
I have a feeling this might be similar to the issue observed in Eclipse when Boot LS was started and shut down in quick sequence over a short period of time. The vscode version of starting/stopping Boot LS still looks at boot projects presence to start/stop boot ls while Eclipse version only looks at boot project presence to start Boot LS once and then never stop it. I have added logging to JDT LS extension in our Boot code (see ebddbc6)... If this issue is observed again please paste the JDT LS log here. I suspect that Boot LS started/stopped a number of times and the last is likely to be the Boot LS stop. Let try to confirm this hypothesis. |
I see below error in CI failure. jdtls-log.zip
|
@Eskibear looks to me that the Boot LS is started up fine and on time. Seems that the issue is classpath listener is added and then removed. I have added more logging to Boot LS The issue in my mind is the race condition. The initial value for enabling classpath listening is |
I re-run CI job in microsoft/vscode-spring-boot-dashboard#303 once and above error was still there (although this time it succeeded). This is because the latest pre-release version of vscode-spring-boot in vscode's marketplace is still |
@Eskibear The new pre-release version is on the marketplace now. |
This comment was marked as outdated.
This comment was marked as outdated.
No luck. Here is another failed run: https://github.com/microsoft/vscode-spring-boot-dashboard/actions/runs/4551207290?pr=303 Same error as above. See: jdtls-log.zip |
Sorry, I forgot the Boot LS log. Let me update the config to also collect Boot LS log file. |
@Eskibear yes, please - the Boot LS log is the most helpful at this point. |
Here it is, hope it helps. jdtls-log.zip |
Great, it works now! I tried several times, and all passed. Attaching logs below, and you may want to check whether they are as expected. BTW from boot-ls.log I find dashboard is querying symbols too frequently, and some of them are unnecessary. I'm going to fix that in dashboard. |
I glanced at the logs - they seem to look as I'd expect them to. I have reverted extra logging changes as I consider this issue to be fixed :-) @Eskibear thanks for helping fixing the issue!-) |
Above screenshot is taken when I starts a new Codespaces session with spring-petclinic repo. Notice that dashboard and workspace symbols are both empty.
When app is not running, dashboard shows beans/endoint mappings based on results from
workspace/symbols
requests. If it's empty, dashboard shows nothing.When app is running, some users are complaining about they cannot switch between "show defined beans" and "show all beans", it always shows all beans. Root cause is also the same, a bean is recognized as "defined in workspace" iff it's also a workspace symbol. (it's reported that after restarting codespaces, it has chance to get back to normal)
The text was updated successfully, but these errors were encountered: