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

Che Theia Dependency Analytics plugin doesn't work #14942

Closed
mmorhun opened this issue Oct 21, 2019 · 10 comments
Closed

Che Theia Dependency Analytics plugin doesn't work #14942

mmorhun opened this issue Oct 21, 2019 · 10 comments
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che area/plugin-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@mmorhun
Copy link
Contributor

mmorhun commented Oct 21, 2019

Describe the bug

Invocation of Dependency Analytics Report ... on a pom.xml or package.json using Dependency Analytics plugin ends up in Error: command 'extension.fabric8AnalyticsWidgetFullStack' not found.

Che version

multiuser, nightly

Steps to reproduce

  1. Create a nodejs or java workspace
  2. Add Dependency Analytics plugin
  3. Start the workspace
  4. Open package.json or pom.xml file
  5. From context menu run Dependency Analytics Report ...
  6. After a minute the followind error appears in the browser dev-console:
Uncaught (in promise) Error: command 'extension.fabric8AnalyticsWidgetFullStack' not found

Expected behavior

The report is shown to the user

Runtime

minishift v1.34.1+c2ff9cb

Screenshots

dependency-analytics-report

Additional context

Probably something is broken in our Che Theia plugin API, because the plugin registers the command.

@mmorhun mmorhun added kind/bug Outline of a bug - must adhere to the bug report template. area/editor/theia Issues related to the che-theia IDE of Che status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Oct 21, 2019
@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 21, 2019

I've just checked - the command is invoked as expected in Eclipse Theia

@ibuziuk
Copy link
Member

ibuziuk commented Oct 21, 2019

@invincibleJai @arajkumar could you please take a look

@ibuziuk ibuziuk added area/plugin-registry team/languages 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 Oct 21, 2019
@ibuziuk ibuziuk added severity/P1 Has a major impact to usage or development of the system. and removed severity/P2 Has a minor but important impact to the usage or development of the system. labels Oct 22, 2019
@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 22, 2019

Yevhen and I did additional testing and it turned out that the root problem is in activation events. Due to some reasons the activate method wasn't called.

@arajkumar
Copy link

I did a quick test & it works in my minishift instance. I tried it with "next" channel,
Screenshot 2019-10-22 at 10 55 57 PM

@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 23, 2019

It sometimes works, sometimes not. If you have projects cloned - probably it will work. Better chance to reproduce the issue is to create a new workspace with some projects, which are cloned after workspace start.

@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 23, 2019

Turned out that the presence of a project doesn't make it work in 100% cases...

@tsmaeder
Copy link
Contributor

While the merged PR fixes the immediate problem, I think we should do some follow-up work:

  1. We cannot trace remote method invocations: console.log, etc. are redirected, so logging messages leads to infinite loop
  2. From the exception stack trace about the "onDidDeploy" it's completely unclear that this will break plugin container initialization, can we please add a try/catch covering the critical section?
  3. The remote plugin initialization mechanism is undocumented. Can we please add a comment somewhere that describes what is happening? Which messages are sent? It's a non-obvious algorithm distributed over multiple files.
  4. We use the string "internal" to mark special messages. Can we at least put that in a constant so that all users of that special tag can be found?

@nickboldt nickboldt mentioned this issue Oct 24, 2019
30 tasks
@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 25, 2019

When I mostly investigate the problem on my local minishift instance I've also tried to do it on che.openshift.io and the bug is reproducible there too (Che 7.1 with unchanged images). Steps:

  1. Create a workspace for node express application (or any other stack with node)
  2. Replace sample project with che-theia
  3. Open workspace
  4. Run analyzation on the root package.json file. First time it started the command, but it then fails to analyze the dependencies. When try to rerun the command, the known error appears:
    openshift-analytics
    So, the bug might not be related to first start or not yet cloned sources...

@nickboldt
Copy link
Contributor

nickboldt commented Oct 25, 2019

Will this be included in 7.3.1? Or is it slipping because not done by EOD Oct 25?

cc: @slemeur Dep analysis plugin was on your list of must haves for CRW 2, right?

@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 28, 2019

After rebase and the PRs merge I cannot reproduce the issue any more and the analytics plugin works for me (it fails to analyze Che and Che-Theia projects, but this is issue of the plugin itself).
Unfortunately we didn't find the root cause of this issue. The problem didn't have reliable steps to reproduce and happened randomly. Also it was almost impossible to reproduce it in debug mode. Anyway, now the problem is gone, so I 'm closing this issue. If anyone is able to reproduce it again with the latest changes - feel free to reopen this issue.

@mmorhun mmorhun closed this as completed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che area/plugin-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants