Skip to content
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

🐛 use custom startup for jdtls #749

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Conversation

pranavgaikwad
Copy link
Contributor

No description provided.

@pranavgaikwad pranavgaikwad marked this pull request as draft December 11, 2024 17:19
Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks excellent love the added error handling that will make debugging environments easier!

@@ -347,18 +347,49 @@ func (p *javaProvider) Init(ctx context.Context, log logr.Logger, config provide
}
}

args := []string{
jdtlsBasePath, err := filepath.Abs(filepath.Dir(filepath.Dir(lspServerPath)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this works because everything is already configured to use the launcher.

In the future, we may have some sort of check if we ever want to change this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@pranavgaikwad
Copy link
Contributor Author

Folks, I am testing this with Kai now so keeping it in draft until then. Thanks for the reviews!

@pranavgaikwad
Copy link
Contributor Author

hey folks, so looks like only the binary tests are failing. pods seem to be getting insufficient cpu error, my guess is that Xmx setting is not being propagated, investigating now

"-Djava.net.useSystemProxies=true",
"-configuration",
"./",
//"--jvm-arg=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1044",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say lets not remove this, as it is quite useful for debugging the bundle. I use it constantly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now

return "", fmt.Errorf("unknown platform %s detected", runtime.GOOS)
}
return filepath.Join(jdtlsBaseDir, configDir), nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is getting quite big, we'll probably have to think about refactoring at some point 😅

@pranavgaikwad pranavgaikwad marked this pull request as ready for review December 12, 2024 15:48
@dymurray dymurray added the cherry-pick/release-0.6 This PR should be cherry-picked to release-0.6 branch label Dec 12, 2024
@pranavgaikwad pranavgaikwad added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2024
Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me!

javaExecToTest := filepath.Join(javaHome, "bin", "java")
if runtime.GOOS == "windows" {
javaExecToTest += ".exe"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, just curious if Windows without JAVA_HOME env var can run java or needs java.exe.

Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Pranav Gaikwad <[email protected]>
@pranavgaikwad pranavgaikwad removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 13, 2024
@pranavgaikwad pranavgaikwad merged commit 4aa811c into konveyor:main Dec 13, 2024
9 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 13, 2024
Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
pranavgaikwad added a commit that referenced this pull request Dec 13, 2024
Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>

Signed-off-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
Co-authored-by: Pranav Gaikwad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-0.6 This PR should be cherry-picked to release-0.6 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants