Skip to content

Commit a954af7

Browse files
authored
chore(jetbrans-gateway): update JetBrains IDEs and remove community editions
Another try at coder#96. I cannot reproduce the error on deployment and dev.coder.com. It also removes Community editions, `Rider`, and `DataGrip` as they are not supported for Remote Development.
1 parent 9fc5eb9 commit a954af7

File tree

3 files changed

+15
-48
lines changed

3 files changed

+15
-48
lines changed

jetbrains-gateway/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ This module adds a JetBrains Gateway Button to open any workspace with a single
1515
module "jetbrains_gateway" {
1616
source = "https://registry.coder.com/modules/jetbrains-gateway"
1717
agent_id = coder_agent.example.id
18-
agent_name = "example"
1918
folder = "/home/coder/example"
20-
jetbrains_ides = ["GO", "WS", "IU", "IC", "PY", "PC", "PS", "CL", "RM", "DB", "RD"]
19+
jetbrains_ides = ["GO", "WS", "IU", "PY", "PS", "CL", "RM"]
20+
default = "PY"
2121
}
2222
```
2323

@@ -31,7 +31,6 @@ module "jetbrains_gateway" {
3131
module "jetbrains_gateway" {
3232
source = "https://registry.coder.com/modules/jetbrains-gateway"
3333
agent_id = coder_agent.example.id
34-
agent_name = "example"
3534
folder = "/home/coder/example"
3635
jetbrains_ides = ["GO", "WS"]
3736
default = "GO"
@@ -45,11 +44,7 @@ This module and JetBrains Gateway support the following JetBrains IDEs:
4544
- GoLand (`GO`)
4645
- WebStorm (`WS`)
4746
- IntelliJ IDEA Ultimate (`IU`)
48-
- IntelliJ IDEA Community (`IC`)
4947
- PyCharm Professional (`PY`)
50-
- PyCharm Community (`PC`)
5148
- PhpStorm (`PS`)
5249
- CLion (`CL`)
5350
- RubyMine (`RM`)
54-
- DataGrip (`DB`)
55-
- Rider (`RD`)

jetbrains-gateway/main.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { it, expect, describe } from "bun:test";
22
import {
33
runTerraformInit,
44
testRequiredVariables,
5-
executeScriptInContainer,
65
runTerraformApply,
76
} from "../test";
87

@@ -11,20 +10,17 @@ describe("jetbrains-gateway", async () => {
1110

1211
await testRequiredVariables(import.meta.dir, {
1312
agent_id: "foo",
14-
agent_name: "bar",
1513
folder: "/baz/",
16-
jetbrains_ides: '["IU", "IC", "PY"]',
1714
});
1815

1916
it("default to first ide", async () => {
2017
const state = await runTerraformApply(import.meta.dir, {
2118
agent_id: "foo",
22-
agent_name: "bar",
2319
folder: "/baz/",
24-
jetbrains_ides: '["IU", "IC", "PY"]',
20+
jetbrains_ides: '["IU", "GO", "PY"]',
2521
});
2622
expect(state.outputs.jetbrains_ides.value).toBe(
27-
'["IU","232.9921.47","https://download.jetbrains.com/idea/ideaIU-2023.2.2.tar.gz"]',
23+
'["IU","232.10203.10","https://download.jetbrains.com/idea/ideaIU-2023.2.4.tar.gz"]',
2824
);
2925
});
3026
});

jetbrains-gateway/main.tf

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ variable "agent_id" {
1414
description = "The ID of a Coder agent."
1515
}
1616

17-
variable "agent_name" {
18-
type = string
19-
description = "The name of a Coder agent."
20-
}
21-
2217
variable "folder" {
2318
type = string
2419
description = "The directory to open in the IDE. e.g. /home/coder/project"
@@ -33,13 +28,14 @@ variable "default" {
3328
variable "jetbrains_ides" {
3429
type = list(string)
3530
description = "The list of IDE product codes."
31+
default = ["IU", "PS", "WS", "PY", "CL", "GO", "RM"]
3632
validation {
3733
condition = (
3834
alltrue([
39-
for code in var.jetbrains_ides : contains(["IU", "IC", "PS", "WS", "PY", "PC", "CL", "GO", "DB", "RD", "RM"], code)
35+
for code in var.jetbrains_ides : contains(["IU", "PS", "WS", "PY", "CL", "GO", "RM"], code)
4036
])
4137
)
42-
error_message = "The jetbrains_ides must be a list of valid product codes. Valid product codes are: IU, IC, PS, WS, PY, PC, CL, GO, DB, RD, RM."
38+
error_message = "The jetbrains_ides must be a list of valid product codes. Valid product codes are IU, PS, WS, PY, CL, GO, RM."
4339
}
4440
# check if the list is empty
4541
validation {
@@ -58,57 +54,37 @@ locals {
5854
"GO" = {
5955
icon = "/icon/goland.svg",
6056
name = "GoLand",
61-
value = jsonencode(["GO", "232.9921.53", "https://download.jetbrains.com/go/goland-2023.2.2.tar.gz"])
57+
value = jsonencode(["GO", "232.10203.20", "https://download.jetbrains.com/go/goland-2023.2.4.tar.gz"])
6258
},
6359
"WS" = {
6460
icon = "/icon/webstorm.svg",
6561
name = "WebStorm",
66-
value = jsonencode(["WS", "232.9921.42", "https://download.jetbrains.com/webstorm/WebStorm-2023.2.2.tar.gz"])
62+
value = jsonencode(["WS", "232.10203.14", "https://download.jetbrains.com/webstorm/WebStorm-2023.2.4.tar.gz"])
6763
},
6864
"IU" = {
6965
icon = "/icon/intellij.svg",
7066
name = "IntelliJ IDEA Ultimate",
71-
value = jsonencode(["IU", "232.9921.47", "https://download.jetbrains.com/idea/ideaIU-2023.2.2.tar.gz"])
72-
},
73-
"IC" = {
74-
icon = "/icon/intellij.svg",
75-
name = "IntelliJ IDEA Community",
76-
value = jsonencode(["IC", "232.9921.47", "https://download.jetbrains.com/idea/ideaIC-2023.2.2.tar.gz"])
67+
value = jsonencode(["IU", "232.10203.10", "https://download.jetbrains.com/idea/ideaIU-2023.2.4.tar.gz"])
7768
},
7869
"PY" = {
7970
icon = "/icon/pycharm.svg",
8071
name = "PyCharm Professional",
81-
value = jsonencode(["PY", "232.9559.58", "https://download.jetbrains.com/python/pycharm-professional-2023.2.1.tar.gz"])
72+
value = jsonencode(["PY", "232.10203.26", "https://download.jetbrains.com/python/pycharm-professional-2023.2.4.tar.gz"])
8273
},
83-
"PC" = {
84-
icon = "/icon/pycharm.svg",
85-
name = "PyCharm Community",
86-
value = jsonencode(["PC", "232.9559.58", "https://download.jetbrains.com/python/pycharm-community-2023.2.1.tar.gz"])
87-
},
88-
"RD" = {
89-
icon = "/icon/rider.svg",
90-
name = "Rider",
91-
value = jsonencode(["RD", "232.9559.61", "https://download.jetbrains.com/rider/JetBrains.Rider-2023.2.1.tar.gz"])
92-
}
9374
"CL" = {
9475
icon = "/icon/clion.svg",
9576
name = "CLion",
9677
value = jsonencode(["CL", "232.9921.42", "https://download.jetbrains.com/cpp/CLion-2023.2.2.tar.gz"])
9778
},
98-
"DB" = {
99-
icon = "/icon/datagrip.svg",
100-
name = "DataGrip",
101-
value = jsonencode(["DB", "232.9559.28", "https://download.jetbrains.com/datagrip/datagrip-2023.2.1.tar.gz"])
102-
},
10379
"PS" = {
10480
icon = "/icon/phpstorm.svg",
10581
name = "PhpStorm",
106-
value = jsonencode(["PS", "232.9559.64", "https://download.jetbrains.com/webide/PhpStorm-2023.2.1.tar.gz"])
82+
value = jsonencode(["PS", "232.10072.32", "https://download.jetbrains.com/webide/PhpStorm-2023.2.3.tar.gz"])
10783
},
10884
"RM" = {
10985
icon = "/icon/rubymine.svg",
11086
name = "RubyMine",
111-
value = jsonencode(["RM", "232.9921.48", "https://download.jetbrains.com/ruby/RubyMine-2023.2.2.tar.gz"])
87+
value = jsonencode(["RM", "232.10203.15", "https://download.jetbrains.com/ruby/RubyMine-2023.2.4.tar.gz"])
11288
}
11389
}
11490
}
@@ -143,8 +119,8 @@ resource "coder_app" "gateway" {
143119
url = join("", [
144120
"jetbrains-gateway://connect#type=coder&workspace=",
145121
data.coder_workspace.me.name,
146-
"&agent=",
147-
var.agent_name,
122+
"&agent_id=",
123+
var.agent_id,
148124
"&folder=",
149125
var.folder,
150126
"&url=",

0 commit comments

Comments
 (0)