Skip to content
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

Support running the Devfile commands by Che-IDEA #21029

Closed
azatsarynnyy opened this issue Jan 17, 2022 · 4 comments · Fixed by che-incubator/jetbrains-editor-images#78
Closed
Assignees
Labels
area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Jan 17, 2022

Is your task related to a problem? Please describe

As a user, I want to be able to run my Devfile commands in Che-IDEA.
The commands should be visible as IDEA's Run Configurations.

Describe the solution you'd like

Before starting Che-IDEA, we can parse a flattened Devfile to read the commands and pass them to the corresponding IDEA's configurations files.

Describe alternatives you've considered

No response

Additional context

This issue is a part of the epic #20591

@azatsarynnyy azatsarynnyy added kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current severity/P1 Has a major impact to usage or development of the system. team/editors area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che labels Jan 17, 2022
@azatsarynnyy azatsarynnyy added this to the 7.43 milestone Jan 17, 2022
@azatsarynnyy azatsarynnyy changed the title Support Devfile commands by Che-IDEA Support running the Devfile commands by Che-IDEA Jan 17, 2022
@azatsarynnyy
Copy link
Member Author

There are three possible solutions that were discussed internally.

  1. With sh script, make the required changes to IDEA-specific XML configurations.
  2. Do the same as above, but with a Java library.
  3. With a native IDEA plug-in, contribute a Run Configurations through the Plug-in API.

We decided to go with solution 2, as it provides a much easier way to work with XML compared to solution 1.
And solution 2 should be faster for implementation compared to solution 3, as 2 doesn't require knowledge of IDEA plug-ins development.

@vzhukovs
Copy link
Contributor

Solution 2 is more convenient, but requires more time for implementation on initial step. As far as we need some mechanism for manipulating with Devfile and XML configurations (run configurations in JetBrains IDEs), it will be better to create a simple library in Kotlin that can parse Devfile to fetch necessary information about commands, that can be used in simple command adapter on step 2 and standalone plugin for JetBrains IDEs on step 3.

Kotlin library for parsing Devfile will be located here: https://github.com/che-incubator/kotlin-devfile-api
It will be similar as implemented library for Go: https://github.com/devfile/library

Will create a dedicate issue for implementing simple kotlin library for manipulating with Devfile and support only necessary functionality at first time. On future iterations, the library will receive improvements to align to all Devfile fields.

cc @l0rd @benoitf @azatsarynnyy

@azatsarynnyy
Copy link
Member Author

I'm ok with a Kotlin library for the Devfile-related operations. As we will need it anyway for deeper integration of JetBrains IDE's with Che.
Unless we already have a similar Java library.
@benoitf do you happen to know if there's a Java library for Devfile stuff?

@benoitf
Copy link
Contributor

benoitf commented Jan 24, 2022

Hello, as Jetbrains is part of devfile specification I think it it would make sense to get their feedback on how they'll handle that part

Anyway, there is a javascript library that is generated from the schema
So I think it could generate as well java stuff

https://github.com/devfile/api/blob/main/.github/workflows/release-typescript-models.yaml

https://github.com/devfile/api/blob/main/build/typescript-model/generate.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants