Repository navigation
fix: harden DevWorkspace watch lifecycle and IDE status check (CRW-12992) - #377
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
==========================================
+ Coverage 0.00% 39.80% +39.80%
==========================================
Files 4 123 +119
Lines 26 5363 +5337
Branches 0 1032 +1032
==========================================
+ Hits 0 2135 +2135
- Misses 26 2943 +2917
- Partials 0 285 +285 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dd914eb to
2df7936
Compare
f2236e8 to
b09a81d
Compare
|
I don't spot any problems with this PR. The only effect of non-JB Editor-based WSs not being watched: the status icon for such WSs doesn't get updated automatically (users always need to click Probably the same could happen to the "Unknown"/"Not-detected"-like WSs (we've added the possibility to be started to). Also in this case the For the WSs detected clearly as JBs Editor based ones everything works perfectly. During my ~2hrs testing session, with the total started thread count (shown by |
|
Not sure if this is anything related to the PR, but I spotted the WS status icons flickering. No actions taken, no WSs changed from outside (I'm not 100% sure about this, but at least I haven't performed any changed in WebDashboard while recording it), no thread counters changing, so it's the same WS-monitor's thread issue: output-looped-5-times.mp4This screencast video is looped 5 times, but the effect gets repeating once in a few minutes with no any action actually taken while, I suppose, any WS that failed shouldn't change its state until explicitly altered. PS: Buttons are actually flickering too - the effect is clearly seen to me when a Running WS is selected: output-flickering-buttons-looped-5-times.mp4 |
|
@vrubezhny the "flickering" that you see is not related to this PR. If you think that this PR is otherwise OK, please +1 it. This "flickering" is related to the tabular listing of the workspaces that shows editors for workspaces. The workspace editors are fetched in a background thread #359 and the editor column updated. Maybe there's a glitch where update would not have to be updated. I cannot clearly see it in the videos. If you think that this is a bug and should be enhanced, we should file a new bug. |
|
@vrubezhny I guess that we should either disable start/stop for non-jetbrains workspaces or watch these for status updates, too. What you report is definitely inconsistent behaviour. |
606afad to
44ed6ca
Compare
|
@vrubezhny I am now back to watching all workspaces. Only watching jetbrains workspaces may reduce the number of threads but introduces inconsistencies. Not worth it. This PR now has the following fixes:
Please re-review, thanks! |
6b98a16 to
c53fee8
Compare
ee2ac42 to
6844db0
Compare
|
@vrubezhny, @azatsarynnyy please review |
48e2b75 to
6a3563f
Compare
…992) * Close the active K8s Watch on stop to unblock IO threads immediately * make watch manager start idempotent, and share the coroutine scope with the workspaces table controller. * add JetBrains workspace detection helpers (editor template annotation resolution, idea-server component check, family classification) with unit tests. * Stop the DevWorkspace watches while the IDE status check and connection run to free Dispatchers.IO for pod exec, and restart them from the cached resource versions in finally blocks. * Register per-namespace watches based on the watch decision so any non-empty namespace with a known resource version is watched, keeping VS Code rows live. * Rename WorkspacesWatch to DevWorkspaceTableController. Signed-off-by: Andre Dietisheim <adietish@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Track elapsed wait time via System.nanoTime() so logs reflect actual probe and refresh duration, not just summed backoff delays. Signed-off-by: Andre Dietisheim <adietish@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
@vrubezhny: I filed the flickering issue to https://redhat.atlassian.net/browse/CRW-13522 |
vrubezhny
left a comment
There was a problem hiding this comment.
Looks good to me, Thanks!
fixes https://redhat.atlassian.net/browse/CRW-12992