-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Introduce builtin Gradle Sync pausing in JetBrains IDEs with GP CLI #20362
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
Conversation
8b81d16 to
d17ce2c
Compare
| - NO_VERIFY_JB_PLUGIN=true | ||
| config: | ||
| commands: | ||
| - ["rm", "-rf", "src/main/kotlin/io/gitpod/jetbrains/remote/listeners/GradleSyncListener.kt"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this line because the file exclude in build.gradle.kt somehow not working well. (And I don't want to investigate why)
| var jetbrainsCmd = &cobra.Command{ | ||
| Use: "jetbrains", | ||
| Aliases: []string{"jb"}, | ||
| Short: "Interact with JetBrains editor.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Short: "Interact with JetBrains editor.", | |
| Short: "Interact with JetBrains IDEs", |
| "Gitpod: Pause gradle sync", | ||
| "Pausing Gradle Sync, execute <code style='color: orange;'>gp jetbrains gradle resume</code> to unblock all builtin Gradle Sync", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "Gitpod: Pause gradle sync", | |
| "Pausing Gradle Sync, execute <code style='color: orange;'>gp jetbrains gradle resume</code> to unblock all builtin Gradle Sync", | |
| "Gitpod: Gradle sync is paused", | |
| "JetBrains' built-in Gradle sync is paused, execute <code style='color: orange;'>gp jetbrains gradle resume</code> to unblock it", |
| notification.addAction(object : NotificationAction("Cancel") { | ||
| override fun actionPerformed(e: AnActionEvent, notification: Notification) { | ||
| isCancelled = true | ||
| notification.expire() | ||
| } | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually cancel the sync? It looks more like it just dismisses the notification. If so, let's rename it to Dismiss. I definitely could be missing something though.
|
@filiptronicek Thanks for your review, but it seems we don't want to have such feature [internal chat]. I have turned this PR into draft |
|
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. |
Description
Updates: We're not sure if we want to ship this change or not yet.
Make it able to block the builtin Gradle Sync in JetBrains IDEs via GP CLI, to improve workspace performance on workspace start without Prebuilds ready when there's two gradle processing running. Show notification in JetBrains IDE to make user aware of this pausing (cancellable)
Related Issue(s)
Fixes CLC-525
How to test
Note
Don't forget to delete files before exit (elasticsearch repo is too big) to save space in preview env
rm -rf /workspace ; gp stop./gradlew --statusto see gradle state1, you should be able to see there's two gradle busy running when workspace started (you should be faster than they finish)2, there should only have one gradle running, and after it's stopped, another one should show (the second one is from IntelliJ IDEA itself)gp jetbrains gradle resumemaually)2, click theCancelbutton on notification, the pausing should be stopped, you should see two gradle processContext repo:
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-testPublish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/previewIf enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all,workspace,webapp,ide,jetbrains,vscode,ssh. If enabled,with-previewandwith-large-vmwill be enabled./hold