gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.71k stars 1.21k forks source link

Epic: JetBrains Prebuilds for Maven #6740

Closed loujaybee closed 1 year ago

loujaybee commented 2 years ago

Is there any kind of guidance how handle importing+indexing in the prebuilds? Our project is very large and if opened from scratch would likely take IntelliJ 10+ minutes to download and index all dependencies (source)

We haven't yet investigated this, this ticket is a placeholder for any changes required on our side to make indexing easier for IntelliJ and/or document any processes that improve the performance.

Remaining

Completed

Value & measuring the impact

Considerations

Related issues:

U1F984 commented 2 years ago

The remote-dev-server.sh seems to support a warm-up command (similar to installPlugins) which could be used.

akosyakov commented 2 years ago

@U1F984 yes, but there are several issues:

U1F984 commented 2 years ago

If it is unfeasible to store the system directory in /workspace maybe Shared project indexes could be used. However this is an ultimate edition feature.

loujaybee commented 2 years ago

@akosyakov can you link to full workspace back-up issues, and incremental prebuild work which might be blocking this issue?

akosyakov commented 2 years ago

System config and cache directories were moved under /workspace folder as a part of https://github.com/gitpod-io/gitpod/pull/8158.

We need to add ability to include JB backend into prebuilds. There following things to consider:

As a prototype, for the start we could support only IntelliJ indexing and it in .gitpod.yml as an experimental feature.

svenefftinge commented 2 years ago

It should be in .gitpod.yml if we create a dependency from the init task. Would it as an intermediate solution be ok to simply download the binaries (in docker or init task) instead of configuring the IDE on project level?

kiview commented 2 years ago

We are currently trying out Gitpod as maintainers of https://github.com/testcontainers/testcontainers-java/ and the IntelliJ integration is a big improvement for us a Java developer.

However, one of my main use cases is to review and try out PRs and because of the nature of our repository, IntelliJ will take 10 minutes or more to index the project. This makes using workspaces as throwaway instances for trying out things very hard for me.

So I just tried to explain our use case and highlight how such a feature would considerably unblock our Gitpod adoption 🙂

akosyakov commented 2 years ago

We don't support it natively yet, but I got it working in this branch: https://github.com/akosyakov/spring-petclinic

Important bits:

This task downloads IntelilJ backend which MUST be aligned with https://github.com/gitpod-io/gitpod/blob/63d893c6c23594c1c273f0aec13e256bae71606c/WORKSPACE.yaml#L11 Then it configures to move indexes to the same directory which will be used by real backend in regular workspace and runs warm up.

If something does not work (hangs) you can run the same task in regular workspace to trace with jstack. Important thought you should use another folder, since only one backend can lock the project folder at the same time. Please capture then warmup task logs and jstack output and share here.

akosyakov commented 2 years ago

We shipped an experimental support of indexing for IntelliJ IDEA using Prebuilds.

loujaybee commented 2 years ago

Adding note that we have:

To move prebuild configurations to the project page. It might therefore make sense to move the JetBrains prebuilds configurations also to that page in the UI rather than in the configuration.

loujaybee commented 1 year ago

Renamed the title of this issue, it was created a long time ago when our understanding of JetBrains Gateway was just forming. We can see now the opportunity to focus on Maven for the time being to get the Prebuilds and opening IDE experience working really well. I'll scope this issue down now to just Maven. However, we'll come back and open a companion issue for Gradle also in time. Learnings from integrating Maven fully with Gitpod will then also carry over.

loujaybee commented 1 year ago

@andreafalzetti has been doing some analysis to compare:

Will share on the issue. JetBrains mentioned improving the warmup features in February, we'll need to make sure our changes and the JetBrains changes are compatible.

loujaybee commented 1 year ago

Work currently paused, waiting on some input from JetBrains.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.