coder / coder/registry

jetbrains-gateway in air-gapped environment can't download the backend

Open
#112 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
79
Forks
161
Avg merge
1d 10h
Merged PRs (30d)
38

Description

Hi
In addition to #22,

When you use **JetBrains Client Downloader** to clone required IDEs into your air-gapped environment, It will create/update a `/products.json` file witch contains all required information of your mirror, including
- build number
- version
- download link

But, The module hardcoded the [download link](https://github.com/coder/registry/blob/ae6cf8c366fabd15c05add47173387ee419338d4/registry/coder/modules/jetbrains-gateway/main.tf#L227) of each IDE instead of getting current the `releases_base_link/products.json`

Also the version info is downloaded from [`{releases_base_link}/products/releases`](https://github.com/coder/registry/blob/ae6cf8c366fabd15c05add47173387ee419338d4/registry/coder/modules/jetbrains-gateway/main.tf#L187) instead of `{releases_base_link}/products.json` and that endpoint is only available on official mirror.

## Potential fix:
Use `{releases_base_link}/products.json` to get release information.

When you are generating [`effective_jetbrains_ide_versions`](https://github.com/coder/registry/blob/ae6cf8c366fabd15c05add47173387ee419338d4/registry/coder/modules/jetbrains-gateway/main.tf#L199C3-L199C35) from `jetbrains_ide_versions`, save the `.releases[{INDEX}].downloads[{INDEX_2}].{PLATFORM}.link` and use that with the `download_base_link`!

In most air-gapped environments, the `download_base_link` and `releases_base_link` should be the same.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.