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

Set up PR Check for Java Che 7 plugins #15797

Closed
2 tasks done
tsmaeder opened this issue Jan 23, 2020 · 7 comments
Closed
2 tasks done

Set up PR Check for Java Che 7 plugins #15797

tsmaeder opened this issue Jan 23, 2020 · 7 comments
Assignees
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Jan 23, 2020

We now have the ability to write tests for a particular VS Code extension (#14409). The goal of this task is to:

  • Write a test suite that smoke-tests the VS Code Java extension
  • Set up a CI task that runs that test suite as a PR Check whenever someone changes a plugin that uses VS Code Java.
@tsmaeder tsmaeder added kind/task Internal things, technical debt, and to-do tasks to be performed. kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. team/languages area/qe labels Jan 23, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jan 23, 2020
@tsmaeder tsmaeder added severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jan 23, 2020
@tsmaeder tsmaeder mentioned this issue Feb 10, 2020
36 tasks
@tsmaeder tsmaeder mentioned this issue Feb 18, 2020
34 tasks
@tsmaeder tsmaeder removed the kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. label Feb 19, 2020
@JPinkney
Copy link
Contributor

JPinkney commented Mar 5, 2020

Just a few things left:

  • Implementation of the languages test api needs to be merged: PR
  • Centos CI languages test PR check needs to be enabled for che-plugin-registry: PR
  • The Java tests should probably be moved to another location: Repo
  • The che-plugin-registry PR check will need to be tested on Centos CI: PR

@JPinkney
Copy link
Contributor

After having the discussion on both the Theia and Che community calls I think we might end up needing a slight change of direction. I think what we need to do is utilize the built-in commands in order to make the calls to the language server, rather than maintaining the extra API.

This has a few advantages:

  • We don't have to maintain extra api
  • We can basically re-use vscode api syntax
  • We don't have to decide which namespace it should live in 😉

But has the disadvantage that we have to wait for all that api to be implemented before we can proceed (I think only a couple are implemented on the theia side).

The only issue I can foresee is that I'm not entirely sure what would happen if you call a command such as: vscode.executeWorkspaceSymbolProvider

before workspace symbol is even added by a language server. My gut feeling is that the tests would just fail. In that case, I think we can adapt the current open PR in che-theia to wait for the language server feature to be added before making the request (similar to what the PR does right now).

@tsmaeder @benoitf If this is the way to proceed I can update the che-theia PR to wait for the language server feature to be added before making the request and modify the sample tests to use the few vscode built-in commands that are available in theia so far.

@JPinkney
Copy link
Contributor

JPinkney commented May 6, 2020

Here's a little overview of how everything works if someone wants to pick it up:

How the java tests work now

-> once the java tests are cloned
-> the tests wait for vscode-java activation
-> then the tests will use vscode built-in commands to call different language methods
-> check the responses
-> write the test result to /projects/test.log
-> once the tests are finished /projects/test.log will contain either TESTS_PASSED or TESTS_FAILED

How the scripts should work

In terms of how the tests should be done, I've created a flow diagram [1]. The current problem is that the tests get stuck on workspace is opened in browser [2]. As it stands, the way that is done is by using python with selenium to open the workspace url, login to keycloak, and then follow the redirect to theia (it does this all headless). The reason this is needed is that a workspace needs to be opened in the browser before git clone will run and the tests executed. The script works locally but running it on the centos ci leads to the python script finishing with:

1588710026238	Marionette	DEBUG	Closed connection 0
JavaScript error: https://static.developers.redhat.com/che/theia_artifacts/theia.9baa83d852b65a9b3143.js, line 1: Error: connection is closed

It's not entirely clear why that issue is occurring and why running that python script works locally but not on centos ci. If you want to try out running the tests automatically you can start a workspace with: https://raw.githubusercontent.com/JPinkney/Che-Java-Tests/master/devfile.yaml

[1]
Flow diagram of tests
[2] - https://github.com/eclipse/che-plugin-registry/blob/2b877e739dbfdfad4d4642b0d2f3d8f71086cd36/.ci/functional-tests-utils.sh#L318

@ericwill
Copy link
Contributor

ericwill commented May 6, 2020

Thanks Josh, the Plugins Team be taking over this work starting in the next sprint (184).

@ericwill ericwill mentioned this issue May 13, 2020
43 tasks
@ericwill
Copy link
Contributor

This is also relevant to #17027

@benoitf
Copy link
Contributor

benoitf commented Aug 26, 2020

Is it planned to use github action to run the tests .

@ericwill
Copy link
Contributor

Is it planned to use github action to run the tests .

I believe the first iteration is using jenkins, but we can use GH actions in the next iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants