Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

feat(task-plugin): bump to devfile 2.0 API #1024

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Mar 10, 2021

What does this PR do?

Switch to devfile 2.0 API instead of using old workspace attributes

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#19188

How to test this PR?

Check tasks are working as expected

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=next

Change-Id: Ib64a9a1b8e4f15ffba869e79bfe7aa1aa0a87b00
Signed-off-by: Florent Benoit fbenoit@redhat.com

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #1024 (936b1c4) into master (6addea2) will increase coverage by 0.32%.
The diff coverage is 14.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1024      +/-   ##
==========================================
+ Coverage   21.07%   21.39%   +0.32%     
==========================================
  Files         298      298              
  Lines       11090    11008      -82     
  Branches     1680     1659      -21     
==========================================
+ Hits         2337     2355      +18     
+ Misses       8603     8508      -95     
+ Partials      150      145       -5     
Impacted Files Coverage Δ
...s/task-plugin/src/export/export-configs-manager.ts 0.00% <0.00%> (ø)
.../task-plugin/src/export/launch-configs-exporter.ts 0.00% <0.00%> (ø)
...ns/task-plugin/src/export/task-configs-exporter.ts 0.00% <0.00%> (ø)
...k-plugin/src/extract/che-task-configs-extractor.ts 0.00% <0.00%> (ø)
...gin/src/extract/vscode-launch-configs-extractor.ts 0.00% <0.00%> (ø)
...lugin/src/extract/vscode-task-configs-extractor.ts 0.00% <0.00%> (ø)
plugins/task-plugin/src/machine/machines-picker.ts 0.00% <0.00%> (ø)
...ins/task-plugin/src/task/backward-compatibility.ts 0.00% <0.00%> (ø)
plugins/task-plugin/src/task/che-task-provider.ts 0.00% <0.00%> (ø)
plugins/task-plugin/src/task/converter.ts 0.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6addea2...be1962b. Read the comment docs.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

Change-Id: Ib64a9a1b8e4f15ffba869e79bfe7aa1aa0a87b00
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

Change-Id: I9b472a7b3a865325c150f91e49b35bc7196545ab
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Mar 12, 2021

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia quay.io/crw_pr/che-theia:1024
che-theia-endpoint-runtime-binary quay.io/crw_pr/che-theia-endpoint-runtime-binary:1024

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

@benoitf benoitf marked this pull request as ready for review March 12, 2021 12:48
@benoitf benoitf requested review from ericwill, sunix and svor as code owners March 12, 2021 12:48
@sunix
Copy link
Contributor

sunix commented Mar 16, 2021

@benoitf so as I understand it's devfile 2.0. How are we dealing with compatibility ? do we have a reference to the work ?

@benoitf
Copy link
Contributor Author

benoitf commented Mar 16, 2021

I'm not sure to follow the question

it's the same process than for all the previous converted plug-ins like container-plugin and workspace-plugin.

  • workspace.runtime expose stuff in devfile v1 format
  • devfile.get() expose stuff in devfile v2 format

All internal extensions are already converted since one month, and now it's the turn of each plug-in.

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

I haven't tested the functionality, but code-wise LGTM

Copy link
Member

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

I tested the changes and can confirm that the main functionality works well for me, I don't see any regression:

  • tasks and launch configs are exported from a devfile to the corresponding config files
  • launch configs from a devfile are available for running
  • I'm able to run a che task from the My Workspace panel and from the Terminal => Run Task menu as well
  • task system asks to select a container if a component is not defined in a configuration for running
  • task system resolves variables for che tasks, like ${file}
  • I'm able to configure che tasks
  • it's possible to terminate and restart a che task
  • task statuses work as expected

@benoitf
Copy link
Contributor Author

benoitf commented Mar 17, 2021

merging, leftover comments will be done in a follow-up PR

@benoitf benoitf merged commit 365c288 into eclipse-che:master Mar 17, 2021
@benoitf benoitf deleted the task-plugin branch March 17, 2021 14:59
@che-bot che-bot added this to the 7.28 milestone Mar 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants