From d35a6a7accf43c307c71d66c62ca9be50dd9e4e7 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Nov 2024 16:34:49 +0500 Subject: [PATCH 1/6] feat(jetbrains-gateway): bump to 2024.3 and enable fetching latest --- jetbrains-gateway/README.md | 10 +++++----- jetbrains-gateway/main.tf | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 00beb83f..e9030e1d 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -14,7 +14,7 @@ This module adds a JetBrains Gateway Button to open any workspace with a single ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.23" + version = "1.0.25" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -32,7 +32,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.23" + version = "1.0.25" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -46,7 +46,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.23" + version = "1.0.25" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -61,7 +61,7 @@ module "jetbrains_gateway" { ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.23" + version = "1.0.25" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" @@ -79,7 +79,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra ```tf module "jetbrains_gateway" { source = "registry.coder.com/modules/jetbrains-gateway/coder" - version = "1.0.23" + version = "1.0.25" agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" diff --git a/jetbrains-gateway/main.tf b/jetbrains-gateway/main.tf index 24bf4768..026b6316 100644 --- a/jetbrains-gateway/main.tf +++ b/jetbrains-gateway/main.tf @@ -59,7 +59,7 @@ variable "coder_parameter_order" { variable "latest" { type = bool description = "Whether to fetch the latest version of the IDE." - default = false + default = true } variable "channel" { @@ -80,36 +80,36 @@ variable "jetbrains_ide_versions" { description = "The set of versions for each jetbrains IDE" default = { "IU" = { - build_number = "241.14494.240" - version = "2024.1" + build_number = "243.21565.193" + version = "2024.3" } "PS" = { - build_number = "241.14494.237" - version = "2024.1" + build_number = "243.21565.202" + version = "2024.3" } "WS" = { - build_number = "241.14494.235" - version = "2024.1" + build_number = "243.21565.180" + version = "2024.3" } "PY" = { - build_number = "241.14494.241" - version = "2024.1" + build_number = "243.21565.199" + version = "2024.3" } "CL" = { - build_number = "241.14494.288" + build_number = "243.21565.238" version = "2024.1" } "GO" = { - build_number = "241.14494.238" - version = "2024.1" + build_number = "243.21565.208" + version = "2024.3" } "RM" = { - build_number = "241.14494.234" - version = "2024.1" + build_number = "243.21565.197" + version = "2024.3" } "RD" = { - build_number = "241.14494.307" - version = "2024.1" + build_number = "243.21565.191" + version = "2024.3" } } validation { From 89fc24bd99cfe1562e24c2571efe049f8a007ae5 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Nov 2024 16:39:34 +0500 Subject: [PATCH 2/6] fix tests --- jetbrains-gateway/main.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetbrains-gateway/main.test.ts b/jetbrains-gateway/main.test.ts index 0a5b3bc3..a532e9bd 100644 --- a/jetbrains-gateway/main.test.ts +++ b/jetbrains-gateway/main.test.ts @@ -22,7 +22,7 @@ describe("jetbrains-gateway", async () => { folder: "/home/coder", }); expect(state.outputs.url.value).toBe( - "jetbrains-gateway://connect#type=coder&workspace=default&owner=default&agent=foo&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=241.14494.240&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.1.tar.gz", + "jetbrains-gateway://connect#type=coder&workspace=default&owner=default&agent=foo&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=243.21565.193&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.3.tar.gz", ); const coder_app = state.resources.find( From df4df5b7b6b77590c7132b7b0c37fe3d85200c47 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Nov 2024 16:42:05 +0500 Subject: [PATCH 3/6] update docs --- jetbrains-gateway/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index e9030e1d..5d913695 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -41,7 +41,7 @@ module "jetbrains_gateway" { } ``` -### Use the latest release version +### Use the fixed set by `jetbrains_ide_versions` ```tf module "jetbrains_gateway" { @@ -52,7 +52,7 @@ module "jetbrains_gateway" { folder = "/home/coder/example" jetbrains_ides = ["GO", "WS"] default = "GO" - latest = true + latest = false } ``` From 01e0f0a5c778263573c115f4ad47edb0bfbcf2a4 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Nov 2024 17:37:23 +0500 Subject: [PATCH 4/6] Add example to use fixed versions --- jetbrains-gateway/README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 5d913695..c4b43cb8 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -41,7 +41,7 @@ module "jetbrains_gateway" { } ``` -### Use the fixed set by `jetbrains_ide_versions` +### Use fixed versions set by `jetbrains_ide_versions` ```tf module "jetbrains_gateway" { @@ -53,6 +53,40 @@ module "jetbrains_gateway" { jetbrains_ides = ["GO", "WS"] default = "GO" latest = false + jetbrains_ide_versions = { + "IU" = { + build_number = "243.21565.193" + version = "2024.3" + } + "PS" = { + build_number = "243.21565.202" + version = "2024.3" + } + "WS" = { + build_number = "243.21565.180" + version = "2024.3" + } + "PY" = { + build_number = "243.21565.199" + version = "2024.3" + } + "CL" = { + build_number = "243.21565.238" + version = "2024.1" + } + "GO" = { + build_number = "243.21565.208" + version = "2024.3" + } + "RM" = { + build_number = "243.21565.197" + version = "2024.3" + } + "RD" = { + build_number = "243.21565.191" + version = "2024.3" + } + } } ``` From 918b282f4ae1d2192aaaadac0415396d1a31d2e2 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Wed, 27 Nov 2024 22:39:56 +0500 Subject: [PATCH 5/6] code suggestions --- jetbrains-gateway/README.md | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index c4b43cb8..3f700812 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -50,42 +50,18 @@ module "jetbrains_gateway" { agent_id = coder_agent.example.id agent_name = "example" folder = "/home/coder/example" - jetbrains_ides = ["GO", "WS"] - default = "GO" + jetbrains_ides = ["IU", "PY"] + default = "IU" latest = false jetbrains_ide_versions = { "IU" = { build_number = "243.21565.193" version = "2024.3" } - "PS" = { - build_number = "243.21565.202" - version = "2024.3" - } - "WS" = { - build_number = "243.21565.180" - version = "2024.3" - } "PY" = { build_number = "243.21565.199" version = "2024.3" } - "CL" = { - build_number = "243.21565.238" - version = "2024.1" - } - "GO" = { - build_number = "243.21565.208" - version = "2024.3" - } - "RM" = { - build_number = "243.21565.197" - version = "2024.3" - } - "RD" = { - build_number = "243.21565.191" - version = "2024.3" - } } } ``` From 877ea71718335d2c27792688d15001d34d508381 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 29 Nov 2024 20:49:28 +0500 Subject: [PATCH 6/6] revert default behaviour --- jetbrains-gateway/README.md | 15 +++++++++++++++ jetbrains-gateway/main.tf | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/jetbrains-gateway/README.md b/jetbrains-gateway/README.md index 3f700812..695238df 100644 --- a/jetbrains-gateway/README.md +++ b/jetbrains-gateway/README.md @@ -41,6 +41,21 @@ module "jetbrains_gateway" { } ``` +### Use the latest version of each IDE + +```tf +module "jetbrains_gateway" { + source = "registry.coder.com/modules/jetbrains-gateway/coder" + version = "1.0.25" + agent_id = coder_agent.example.id + agent_name = "example" + folder = "/home/coder/example" + jetbrains_ides = ["IU", "PY"] + default = "IU" + latest = true +} +``` + ### Use fixed versions set by `jetbrains_ide_versions` ```tf diff --git a/jetbrains-gateway/main.tf b/jetbrains-gateway/main.tf index 026b6316..4911be6c 100644 --- a/jetbrains-gateway/main.tf +++ b/jetbrains-gateway/main.tf @@ -59,7 +59,7 @@ variable "coder_parameter_order" { variable "latest" { type = bool description = "Whether to fetch the latest version of the IDE." - default = true + default = false } variable "channel" {