Skip to content

Use dynamic links for downloading the latest version of JetBrains Tools #9268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

felladrin
Copy link
Contributor

@felladrin felladrin commented Apr 12, 2022

Description

EAP versions of JetBrains Tools have an expiration date. So we need to keep constantly updating the build config for picking up the latest version (be it EAP, RC, or even the stable release if it was the last one published).

This PR makes the latest versions to be downloaded from dynamic links provided by JetBrains API, to ensure we never get the following error again:

2022-04-12 14:52:28,208 [      3]   INFO - #c.i.i.StartupUtil - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2022-04-12 14:52:28,291 [     86]   INFO - #c.i.i.StartupUtil - JNA library (64-bit) loaded in 14 ms
2022-04-12 14:52:28,306 [    101]   INFO - #c.i.i.p.PluginManager - Using broken plugins file from IDE distribution
2022-04-12 14:52:28,315 [    110]   INFO - #c.i.i.StartupUtil - IDE: IntelliJ IDEA (build #IU-221.4994.44, 11 Mar 2022 18:02)
2022-04-12 14:52:28,315 [    110]   INFO - #c.i.i.StartupUtil - OS: Linux (5.4.0-1059-gke, amd64)
2022-04-12 14:52:28,320 [    115]   INFO - #c.i.i.StartupUtil - JRE: 11.0.14.1+1-b2043.11 (JetBrains s.r.o.)
2022-04-12 14:52:28,320 [    115]   INFO - #c.i.i.StartupUtil - JVM: 11.0.14.1+1-b2043.11 (OpenJDK 64-Bit Server VM)
2022-04-12 14:52:28,325 [    120]   INFO - #c.i.i.StartupUtil - WM detected: null, desktop: -
2022-04-12 14:52:28,326 [    121]   INFO - #c.i.i.StartupUtil - args: [cwmHostNoLobby, /workspace/spring-petclinic]
2022-04-12 14:52:28,327 [    122]   INFO - #c.i.i.StartupUtil - library path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2022-04-12 14:52:28,327 [    122]   INFO - #c.i.i.StartupUtil - boot library path: /ide-desktop/backend/jbr/lib
2022-04-12 14:52:28,367 [    162]   INFO - #c.i.i.StartupUtil - locale=en_US JNU=UTF-8 file.encoding=UTF-8
  idea.config.path=/workspace/.config/JetBrains/RemoteDev-IU/_workspace_spring-petclinic
  idea.system.path=/workspace/.cache/JetBrains/RemoteDev-IU/_workspace_spring-petclinic
  idea.plugins.path=/workspace/.config/JetBrains/RemoteDev-IU/_workspace_spring-petclinic/plugins
  idea.log.path=/workspace/.cache/JetBrains/RemoteDev-IU/_workspace_spring-petclinic/log
2022-04-12 14:52:28,384 [    179]   INFO - #c.i.i.StartupUtil - CPU cores: 1; ForkJoinPool.commonPool: java.util.concurrent.ForkJoinPool@5c58b26d[Running, parallelism = 1, size = 1, active = 1, running = 1, steals = 0, tasks = 0, submissions = 1]; factory: com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory@7faded87
2022-04-12 14:52:28,405 [    200]   INFO - STDOUT - This IDE build has expired. Please download a new build from JetBrains official site
2022-04-12 14:52:28,406 [    201]   INFO - #c.i.i.StartupUtil - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------

Note the This IDE build has expired. Please download a new build from JetBrains official site message in the snippet above.

Related Issue(s)

NONE

How to test

Open any JetBrains Tool with "Latest" checkbox checked and confirm it works.

Alternatively, you can access the download links on your browser and confirm they're all working:

Release Notes

NONE

Documentation

NONE

@iQQBot
Copy link
Contributor

iQQBot commented Apr 13, 2022

JETBRAINS_BACKEND_URL is a cache key, It will be included in the hash calculation and may not be recompiled if it is a fixed value

Also, in prod, we have daily build scripts that release the latest IDE every day, so this doesn't expire

@iQQBot
Copy link
Contributor

iQQBot commented Apr 13, 2022

The value here should only affect the preview environment

@akosyakov
Copy link
Member

akosyakov commented Apr 13, 2022

As @iQQBot said these images only are used in prev envs to test changes against latest version. We do need to realign them from to time by changing JETBRAINS_BACKEND_URL key to trigger rebuild of images, but it should be only necessary when we get an issue on PRs. Maybe we could provide a script which can update it automatically.

@akosyakov
Copy link
Member

akosyakov commented Apr 13, 2022

@iQQBot maybe we actually try this approach? I would expect that it is only relevant when someone is changing let's say JB backend plugin which should trigger rebuild of images anyway?

We could also add then instead some env var in Docker image to explicitly retrigger rebuild if image is stale, but need to be updated. WDYT?

@felladrin felladrin changed the title Use dynamic links for downloading EAP version of JetBrains Tools Use dynamic links for downloading the latest version of JetBrains Tools Apr 13, 2022
@felladrin felladrin force-pushed the vn/dynamic-links-for-eap-jetbrains-tools branch from fa8d2d1 to 38e892b Compare April 13, 2022 08:38
@roboquat roboquat added size/XL and removed size/XS labels Apr 13, 2022
@felladrin felladrin force-pushed the vn/dynamic-links-for-eap-jetbrains-tools branch from 38e892b to 5e58d34 Compare April 13, 2022 08:49
@roboquat roboquat added size/S and removed size/XL labels Apr 13, 2022
@felladrin felladrin force-pushed the vn/dynamic-links-for-eap-jetbrains-tools branch 2 times, most recently from 2ec54bd to 85c261b Compare April 13, 2022 09:59
@felladrin felladrin force-pushed the vn/dynamic-links-for-eap-jetbrains-tools branch from 85c261b to c5bc40f Compare April 13, 2022 10:27
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try

nice find btw

@roboquat roboquat merged commit d7e743f into main Apr 13, 2022
@roboquat roboquat deleted the vn/dynamic-links-for-eap-jetbrains-tools branch April 13, 2022 10:38
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production editor: jetbrains release-note-none size/S team: IDE
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants