-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Clean up Jetbrains Backend plugin #6603
Conversation
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
fe6901a
to
bb701cc
Compare
Before the IDE project starts, an error is logged:
@corneliusludmann do you think this is an issue? Do you have any suggestion? |
When the project is not fully loaded the diff --git a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/ide/jetbrains/backend/services/ControllerStatusService.kt b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/ide/jetbrains/backend/services/ControllerStatusService.kt
index ae99d3c43..5ecfaa12b 100644
--- a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/ide/jetbrains/backend/services/ControllerStatusService.kt
+++ b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/ide/jetbrains/backend/services/ControllerStatusService.kt
@@ -47,8 +47,8 @@ object ControllerStatusService {
throw IOException("Failed to retrieve controller status.", e)
}
- if (response.projects.isEmpty()) {
- throw IOException("Failed to fetch controller status as project list is empty.")
+ if (response.projects.isNullOrEmpty()) {
+ return@retry ControllerStatus(false, 0);
}
ControllerStatus(
@@ -60,7 +60,7 @@ object ControllerStatusService {
@JsonIgnoreProperties(ignoreUnknown = true)
private data class Response(
val appPid: Int,
- val projects: List<Project>
+ val projects: List<Project>?
) {
@JsonIgnoreProperties(ignoreUnknown = true)
data class Project( (the empty return What do you think? |
@corneliusludmann I think that's also reasonable. As we also have errors in the supervisor (?) while checking whether IDEA is up, I didn't consider it to much of an issue but in this case the returned value is actually "true". |
7fb89c5
to
5324b95
Compare
Looks great and works as expected. (Took the liberty to rebase the branch. 🙏) /lgtm |
LGTM label has been added. Git tree hash: b18dd01ad024dadd3045ab3c547ba2cd2f36f0dd
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: corneliusludmann Associated issue: #6513 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Info
.ControllerStatusService
to fail explicitlyRelated Issue(s)
Fixes #6513
How to test
Validate heartbeats are still functioning.
Release Notes