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

Disable tasks output scanning #17970

Closed
l0rd opened this issue Sep 25, 2020 · 9 comments · Fixed by eclipse-che/che-theia#889
Closed

Disable tasks output scanning #17970

l0rd opened this issue Sep 25, 2020 · 9 comments · Fixed by eclipse-che/che-theia#889
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Sep 25, 2020

Is your enhancement related to a problem? Please describe.

Every time I start a task I am prompted with a question about "scanning the task output".

image

This is a bad UX. I understand that this is a VS Code behavior but it's still a bad behavior. I don't know why I am asked for that: if scanning helps to highlight problems in my source code it should always be enabled, otherwise it should not. That's not a question for users.

And the help links to VS Code documentation where it says

VS Code ships with several problem matchers 'in-the-box'

but I have no clue if Che/Theia ships with the same problem matchers or not.

Describe the solution you'd like

Disable output scanning by default. Don't ask user.
When we will be convinced that this is helpful in Che/Theia we will enable output scanning. But we should never ask users if they want to enable it.

@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Sep 25, 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 Sep 25, 2020
@yhontyk yhontyk added area/editor/theia Issues related to the che-theia IDE of Che 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 Sep 25, 2020
@tsmaeder
Copy link
Contributor

@l0rd you realize you can just select "never scan the task output" to make it shut up, right?

@l0rd
Copy link
Contributor Author

l0rd commented Sep 29, 2020

@tsmaeder you don't know how many times I clicked that yes.

@tsmaeder
Copy link
Contributor

Are we not keeping that state when we restart the workspace?

@azatsarynnyy
Copy link
Member

Never scan the task output stores the state as "problemMatcher": [] in tasks.json
We could propose adding some option/preference in upstream Theia to disable it by default.

@azatsarynnyy azatsarynnyy added this to the 7.21 milestone Sep 30, 2020
@tsmaeder
Copy link
Contributor

tsmaeder commented Oct 1, 2020

if scanning helps to highlight problems in my source code it should always be enabled, otherwise it should not.

That just does not work for tasks defined by the user (shell tasks, basically): the system can't know what output scanner to apply to a random shell command.

@l0rd
Copy link
Contributor Author

l0rd commented Oct 1, 2020

if scanning helps to highlight problems in my source code it should always be enabled, otherwise it should not.

That just does not work for tasks defined by the user (shell tasks, basically): the system can't know what output scanner to apply to a random shell command.

Got it. The task in question is defined in the quarkus devfile in our registry. We have written the task, we should also specify the scanner to apply then. That could be another option but is that possible? In any case the developer that is using a devfile maintained by us should not be asked.

@tsmaeder
Copy link
Contributor

tsmaeder commented Oct 1, 2020

Sound more like a problem in the devfile, if you ask me.

@l0rd
Copy link
Contributor Author

l0rd commented Oct 6, 2020

Sound more like a problem in the devfile, if you ask me.

If the devfile syntax currently allow to specify the problemMatchers for every command let's to that for all the devfile in the registry.

@azatsarynnyy
Copy link
Member

We don't need to modify all Devfiles.
The problem can be solved by a minor enhancement of Task Plugin.

If we have decided that scanning a task output with the problem matchers must be disabled by default, it's enough to simply use the corresponding mechanism, already provided by Che Theia, in the right way.

Each task, defined in the tasks.json file, may have a list of problem matchers attached. It's optional and can be empty as well.
Only if it's explicitly defined as empty ("problemMatcher": []) Che Theia won't ask the user to choose a preferred option to scan output.

So, what we need to do?
On the stage of translating/importing a Che Command from a Devfile to tasks.json file, Task Plugin should add an empty problem matcher to each imported task. Just a single property and that's it.

With this enhancement applied, such Che Command in Devfile
image

will be imported as the task with an empty problem matcher
image

And the user won't be asked anymore for any additional info after running such a task. As long as he/she set some problem matcher for the task.

@azatsarynnyy azatsarynnyy mentioned this issue Oct 8, 2020
15 tasks
@azatsarynnyy azatsarynnyy self-assigned this Oct 21, 2020
@azatsarynnyy azatsarynnyy added the status/in-progress This issue has been taken by an engineer and is under active development. label Oct 21, 2020
@azatsarynnyy azatsarynnyy removed the status/in-progress This issue has been taken by an engineer and is under active development. label Oct 23, 2020
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 kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants