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

Consume VS Code built-in extensions in Che-Theia #618

Merged
merged 1 commit into from
Feb 14, 2020
Merged

Conversation

vzhukovs
Copy link
Contributor

@vzhukovs vzhukovs commented Jan 31, 2020

What does this PR do?

This changes proposal include in che-theia image default VS Code built-in extensions that provide by theia build.

To check this PR, you can use following devfile:

Try Che-Theia editor only

When workspace will start, you'll be able to open View - Open View... - Plugins to ensure that all VS Code built-in extensions are included into assembly.

Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com

What issues does this PR fix or reference?

eclipse-che/che#14759

Release Notes

Consume VS Code built-in extensions in Che-Theia

Docs PR

N/A - internal enhancement

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@eclipse-che eclipse-che deleted a comment from che-bot Jan 31, 2020
@vzhukovs vzhukovs changed the title Working copy Consume VS Code built-in extensions in Che-Theia Jan 31, 2020
@vzhukovs vzhukovs self-assigned this Jan 31, 2020
@vzhukovs vzhukovs added kind/enhancement New feature or request severity/P1 labels Jan 31, 2020
@vzhukovs vzhukovs marked this pull request as ready for review January 31, 2020 15:37
@@ -45,3 +49,14 @@ function mkdirSyncRecursive(dir) {
curPath.length > 0 && !fs.existsSync(curPath) ? fs.mkdirSync(curPath) : null;
}
};

function copyFolderSync(from, to) {
Copy link
Contributor

Choose a reason for hiding this comment

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

hello, is it fast to copy all the plugins ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean, in comparison with calling system cp -r ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes sorry I didn't write much comment

yes comparing this nodejs copy vs system cp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haven't checked yet. I can try to compare these two approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comparison provided in: #618 (comment)

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

I would wait until monday to merge if possible

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

I think we're copying too many extensions

for example vscode-builtin-typescript-language-features (typescript language server is only added if a sidecar/different plug-in is added no ) ?

Also what about git ? shouldn't it be part of the built-in extensions instead of being copied from Dockerfile ?

https://github.com/theia-ide/vscode-builtin-extensions/releases/tag/v1.39.1-prel

@azatsarynnyy
Copy link
Member

If I understand everything right, we should not just copy the set of all the VS Code extensions that Theia includes.
But we need to have our own set of VS Code extensions that we want to include in Che Theia.
@benoitf WDYT?

If that's correct, we can just reuse the mechanism provided by Theia:

@benoitf
Copy link
Contributor

benoitf commented Feb 3, 2020

@azatsarynnyy maybe that yes if we're depending on a custom set of extensions it'll be easier

It's mainly because we decided to move some extensions to other containers
about your proposal we may check if it'll download the extensions everytime or if there is cache on downloads as well.

Also probably we need to remove https://github.com/eclipse/che-theia/blob/master/dockerfiles/theia/Dockerfile#L99 and use it from https://github.com/theia-ide/vscode-builtin-extensions/releases as well (through package.json theiaPlugins

@vzhukovs
Copy link
Contributor Author

vzhukovs commented Feb 4, 2020

@benoitf we need to take into account, that if we use download:plugins command in our package.json, we should also rely on specific url for the every extension. Which may be updated in upstream. I think, we should have somewhere the list of name extensions, which we agreed to use with che-theia and copy them from theia package.

@eclipse-che eclipse-che deleted a comment from che-bot Feb 5, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Feb 5, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Feb 5, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Feb 7, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Feb 7, 2020
@vzhukovs
Copy link
Contributor Author

vzhukovs commented Feb 7, 2020

crw-ci-test

@eclipse-che eclipse-che deleted a comment from che-bot Feb 9, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Feb 9, 2020
@vzhukovs
Copy link
Contributor Author

@benoitf I compared two ways of copying the directories:

called command to measure the execution time and copied 46 extensions:
time ./foreach_yarn

nodejs copy with function:

function copyFolderSync(from, to) {
    fs.mkdirSync(to);
    fs.readdirSync(from).forEach(element => {
        if (fs.lstatSync(path.join(from, element)).isFile()) {
            fs.copyFileSync(path.join(from, element), path.join(to, element));
        } else {
            copyFolderSync(path.join(from, element), path.join(to, element));
        }
    });
}

./foreach_yarn 0.12s user 0.17s system 55% cpu 0.524 total
./foreach_yarn 0.13s user 0.18s system 79% cpu 0.389 total

system copy with the function:

        const r = spawnSync('cp', ['-R', `${pluginFolderPath}`, `${targetDir}/${pluginFolderName}`], {
            cwd: undefined,
            detached: true,
            stdio: "inherit"
        });
        if (r.status === 1) {
            console.log('this one');
            process.exit(1);
        }

./foreach_yarn 0.14s user 0.32s system 81% cpu 0.555 total
./foreach_yarn 0.13s user 0.28s system 84% cpu 0.492 total

So, copying using nodejs a bit faster, as it doesn't creates additional process.

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Feb 11, 2020

✅ 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 docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

@eclipse-che eclipse-che deleted a comment from che-bot Feb 12, 2020
@che-bot
Copy link
Contributor

che-bot commented Feb 12, 2020

✅ 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 docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

@che-bot
Copy link
Contributor

che-bot commented Feb 12, 2020

✅ 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 docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

@che-bot
Copy link
Contributor

che-bot commented Feb 12, 2020

✅ 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 docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

"vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
"vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix",
"vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix",
"vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
Copy link
Member

Choose a reason for hiding this comment

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

I guess typescript extension can be removed as we're providing Che Plugin instead

Copy link
Contributor Author

@vzhukovs vzhukovs Feb 12, 2020

Choose a reason for hiding this comment

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

Removed

Copy link
Member

Choose a reason for hiding this comment

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

I've tested the updated image and there's no syntax highlighting for TS.

As I understand, there're two builtin extensions in VS Code: typescript-basics and typescript-language-features.
What we provide with TS Che Plugin it's typescript-language-features. And typescript-basics must be bundled with Che Theia.
So, let's revert the removed one - vscode-builtin-typescript. Sorry for the confusion.

@che-bot
Copy link
Contributor

che-bot commented Feb 12, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

tested on che.openshift.io

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@RomanNikitenko
Copy link
Member

@vzhukovskii
I see that you are restarting the tests, but maybe at the moment it's expected that the tests failed
eclipse-che/che#16017

@vzhukovs
Copy link
Contributor Author

@RomanNikitenko the latest run was unstable, error message found in logs:

17:01:36 @eclipse-che/theia-generator:   ● Test Extensions › use default extensions
17:01:36 @eclipse-che/theia-generator:     Unable to execute the command git clone -b master --single-branch --depth 1 https://github.com/eclipse/che-theia che-theia: Error: Command failed: git clone -b master --single-branch --depth 1 https://github.com/eclipse/che-theia che-theia
17:01:36 @eclipse-che/theia-generator:     fatal: Not a git repository: '/tmp/tmpExtensions13845Z4NR05zaBxQz/che-theia/che-theia/.git'
17:01:36 @eclipse-che/theia-generator:       at cp.exec (src/command.ts:939:20)

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Feb 13, 2020

❌ E2E Happy path tests failed ❗

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

See Details

name link
che-theia docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@vzhukovs
Copy link
Contributor Author

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Feb 14, 2020

✅ 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 docker.io/maxura/che-theia:618
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:618

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement New feature or request severity/P1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants