feat(jetbrains): add plugin pre-installation support#731
feat(jetbrains): add plugin pre-installation support#731Harsh9485 wants to merge 14 commits intocoder:mainfrom
Conversation
…rsh9485/registry into Pre-Install-jetBrains-Plugins-support
|
@DevelopmentCats @matifali, PR is ready for review. |
|
I am testing this and will let you know how it goes with a review |
|
After some testing it seems to work well. I tested with various different plugins and different IDE's in the toolbox and it is working great. I will look this over and make sure everything looks good with the module code, and I think we will be good to go. |
|
Hey @DevelopmentCats @matifali, can we finish it today? |
|
One thing that I notice might be useful here @Harsh9485 is if you were to log which IDE the plugins are being installed for in the We are on the home stretch here we are just awaiting one more review on this and we should be good to go 😸 |
…rsh9485/registry into Pre-Install-jetBrains-Plugins-support
Bug: IntelliJ IDEA plugin directory name mismatchThe
But JetBrains uses
Plugins for IntelliJ IDEA are written to the wrong path and never picked up by the IDE. All other IDEs are unaffected because their display names match their directory names:
Ref: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519 Suggested fix: add a product-code-to-directory-name mapping in the script rather than relying on the display name, or add a |
@Harsh9485 All of the other IDE's work fine this is the only one that has issues. |
|
@Harsh9485 Thanks for the update addressing the IntelliJ IDEA directory name. A few issues in the latest commit: 1. RustRover directory name is wrongLine 49 maps 2. Hardcoded build numbers will go stale
3. Suggestion: use ide_config.json instead of hardcodingThe previous version of this PR wrote |
|
@DevelopmentCats, Done!
|
|
hey @DevelopmentCats, could you let me know who will be reviewing the code next? |
|
Hey @DevelopmentCats @matifali, any update? |
|
Sorry for the delay on this. We were interfacing with JetBrains to see if they had any insight on this. Based on our correspondence it looks like Have you attempted this in your work up til now, or do you have any thoughts on this? @Harsh9485 |
I understand your idea. First, we can mention that if someone wants to use pre-installed plugins, they should first create the workspace, install the IDE, and then restart the workspace. At that time, the scripts will run and check whether any IDE is installed. If yes, the script will install all the plugins. This approach also solves the race condition that occurred in my previous PR. So yes, I think that idea is good. |


Description
Adds a jetbrains_plugins parameter to the JetBrains module.
This parameter accepts a map of JetBrains Marketplace plugin IDs and installs them automatically when the workspace starts.
/claim #208
Approach
Uses the JetBrains Marketplace API to download plugins:https:
<plugins.jetbrains.com/pluginManager?action=download&id=<pluginId>&build=<productCode>-<buildNumber>Stores IDE metadata (name and build number) in ide_config.json, generated during Terraform apply.
The build number is used to construct the correct Marketplace download URL for each IDE.
Plugin installation runs asynchronously using nohup, so the workspace becomes ready immediately.
The IDE installation is not blocked, and users can start using the workspace while plugins are being installed in the background.
Changes
Adds jetbrains_plugins variable of type map(list(string))
Example:
{ "PY" = [ "com.koxudaxi.pydantic", "com.intellij.kubernetes" ] }Allows installing different plugins per IDE.
scripts/install_plugins.sh:
Downloads plugins using the Marketplace API
Detects whether the plugin is a ZIP or JAR
Installs it into the correct IDE plugin directory
videos
1 video setup:- https://drive.google.com/file/d/1WB5jRkCOM0w4rEUY-za_3hEvo116UCGd/view?usp=sharing
2 video proof:- https://drive.google.com/file/d/1ZeGUJPJ-gSGNvNzwq8_V-cozz2NqveUT/view?usp=sharing
Type of Change
Module Information
Path:
registry/coder/modules/jetbrainNew version:
v1.0.0Breaking change: [ ] Yes [ ] No
Testing & Validation
bun test)bun fmt)