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

[supervisor] remove JAVA_TOOL_OPTIONS hack #19630

Merged
merged 1 commit into from May 3, 2024
Merged

[supervisor] remove JAVA_TOOL_OPTIONS hack #19630

merged 1 commit into from May 3, 2024

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Apr 16, 2024

Description

Remove setting Xmx to the containers memory size

Related Issue(s)

Fixes #

How to test

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

to unblock, not sure what kind of side effects it can cause

@csweichel
Copy link
Contributor

How can we get a better understanding of the side effects? I.e. how do we know what impact this will have on other customers?

@akosyakov
Copy link
Member

akosyakov commented Apr 16, 2024

@csweichel I think we will need to test with Java <= 10 and see what happens. It seems it could cause some issues with allocating desired amount of memory, maybe process crash on the startup.

@svenefftinge
Copy link
Member Author

@csweichel do you remember why this was introduced? I can't find any related conversation in issues, PRs or slack.
Just the original commit 8c2894f

@csweichel
Copy link
Contributor

According to JetBrains about 50% of all Java usage is Java8, i.e. would be affected by this change.

The current situation also isn't great.
Can we tell < Java10 users more explicitly what they need to configure?

image

@akosyakov
Copy link
Member

Can we tell < Java10 users more explicitly what they need to configure?

I don't think it is about IntelliJ itself, we already unset JAVA_TOOL_OPTIONS for IntelliJ backend, because we use default Xmx settings there. I think mostly it will be affected other user loads, like user apps, not IDEs. It maybe alright, if they fail to start then a user has to adjust Xmx

@csweichel
Copy link
Contributor

It's not about IntelliJ at all.

It maybe alright, if they fail to start then a user has to adjust Xmx

How would a user (for whom things probably worked just fine until now), know that?
How do we know how many users would actually be affected?

@akosyakov
Copy link
Member

akosyakov commented Apr 17, 2024

How would a user (for whom things probably worked just fine until now), know that?

Java LS starts crashing in VS Code, some user apps.

How do we know how many users would actually be affected?

I guess we will see something from IDE logs started by us, but any load from user terminals or VS Code Desktop won't be visible to us. I would say we will need to test and check logs first to know what to look for.

@akosyakov
Copy link
Member

Can we feature flag it and rollout to selected customers first?

@csweichel
Copy link
Contributor

How would a user (for whom things probably worked just fine until now), know that?

Java LS starts crashing in VS Code, some user apps.

Users would know that their stuff is crashing. How would they know what they need to do?

if cfg.ConfigcatEnabled {
experimentsClientOpts = append(experimentsClientOpts, experiments.WithGitpodProxy(host))
}
exps := experiments.NewClient(experimentsClientOpts...)
Copy link
Member

@akosyakov akosyakov May 3, 2024

Choose a reason for hiding this comment

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

there should be already exps defined in this file

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I moved that up

@svenefftinge
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 2e8e2d9 into main May 3, 2024
15 checks passed
@roboquat roboquat deleted the se/jvm-xmx branch May 3, 2024 11:25
@@ -41,3 +42,7 @@ func SupervisorPersistServerAPIChannelWhenStart(ctx context.Context, client Clie
func SupervisorUsePublicAPI(ctx context.Context, client Client, attributes Attributes) bool {
return client.GetBoolValue(ctx, SupervisorUsePublicAPIFlag, false, attributes)
}

func IsSetJavaXmx(ctx context.Context, client Client, attributes Attributes) bool {
return client.GetBoolValue(ctx, SetJavaXmxFlag, false, attributes)
Copy link
Member

Choose a reason for hiding this comment

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

@svenefftinge default should be true, for backward compatibility? not sure

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to go the other way around and see how it's going. Ideally we can get rid of this special hack and users do this themselves.

Copy link
Member

Choose a reason for hiding this comment

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

ok, it is just if there is a connection hiccups or so it maybe impossible to revert this change via the feature flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants