Bug [jetbrains-gateway]: Errors produced when `jetbrains_ide_versions` aren't a covering set
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- terraform
- Ambito
- tooling
Direzione di ricerca
Leggi jetbrains-gateway/main.tf intorno alle righe 186-188 e segui come viene usato jetbrains_ide_versions nella costruzione dei dati dell'IDE. Riproduci l'esempio con solo IU configurato, quindi verifica che gli identificatori di prodotto omessi non producano più errori invalid-index, mentre l'IDE richiesto continui ad avere il proprio numero di build, link di download e versione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue
When I specify jetbrains_ide_versions, it causes the template to throw errors unless all of the versions are set in the template. As a user, I would prefer to only set versions for the specific versions that I need to make explicit.
For example, if I only need a specific version of IntelliJ IDEA Ultimate, I would like to have my variables set like the following:
module "jetbrains_gateway" {
jetbrains_ides = ["IU"]
default = "IU"
latest = false
jetbrains_ide_versions = {
"IU" = {
build_number = "243.26053.27"
version = "2024.3"
}
}
}
However, if I do that currently, I receive three errors per product identifier, even for the ones I do not have configured, like the following:
╷
│ Error: Invalid index
│
│ on jetbrains-gateway/main.tf line 186, in locals:
│ 186: build_number = var.jetbrains_ide_versions["GO"].build_number,
│ ├────────────────
│ │ var.jetbrains_ide_versions is map of object with 1 element
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Invalid index
│
│ on jetbrains-gateway/main.tf line 187, in locals:
│ 187: download_link = "${var.download_base_link}/go/goland-${var.jetbrains_ide_versions["GO"].version}.tar.gz"
│ ├────────────────
│ │ var.jetbrains_ide_versions is map of object with 1 element
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Invalid index
│
│ on jetbrains-gateway/main.tf line 188, in locals:
│ 188: version = var.jetbrains_ide_versions["GO"].version
│ ├────────────────
│ │ var.jetbrains_ide_versions is map of object with 1 element
│
│ The given key does not identify an element in this collection value.
╵
This looks to be related to the lines like this, which would be attempting to access variables that don't exist in the replaced set of values.
Potential remediations
If we move the current default list of IDE versions to a local, we could then merge in a user-supplied jetbrains_ide_versions to create a fully-covering map. Perhaps we could do the same thing with the default list of IDEs; however in that case, we might want to step on the defaults if the template admins provides a specific list of IDEs to show.
The super-sized fix for this would fetch the output for the Jetbrains product API, cache the values as a local latest which would be put in amber for each version of the module. This has the side benefit of providing an object that we could merge both user supplied and freshly-fetched latest version data from the product API into the cached data. That object would also contain information about all of the platform specific download URLs. We still have to maintain a separate object to hold the product code, full IDE names, and icons to use.
Externalizing the data as JSON files and loading them in from the module also makes them a bit more editable/loadable without having to edit the template source anytime we want to update the in-built defaults.
- Lingua principale
- HCL
- Stelle
- 80
- Fork
- 161
- Merge medio
- 2g 3h
- PR unite (30g)
- 38
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/registry
-
perplexica: deprecate or fixAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
coder/registry#1142 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add a stale workflow for PRsAperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
coder/registry#1120 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
chore: ensure that AWS EC2 instances actually use the AWS region moduleForse già presa @DevelopmentCats l’ha presa 10 giorni fa. Aperta
coder/registry#1122 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
coder/registry#1101 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
coder/registry#1100 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di coder/registry
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ScoopInstaller/Games#1812 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
melgarafael/DeskcommCRM#1812 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gregwebs/pi-quota-dispatcher#26 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-reported area/docs area/vite-plugin enhancement fw/vite good first issue hacktoberfest help wanted P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno