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

Add Problem matcher docs #56

Closed
damccorm opened this issue Aug 14, 2019 · 10 comments · Fixed by #198
Closed

Add Problem matcher docs #56

damccorm opened this issue Aug 14, 2019 · 10 comments · Fixed by #198
Assignees

Comments

@damccorm
Copy link
Contributor

Would be helpful to have a schema/explanation of what matchers actually do.

@damccorm damccorm self-assigned this Aug 14, 2019
@xt0rted
Copy link
Contributor

xt0rted commented Aug 22, 2019

I added one of these to my action and it was working ok, but when I switched it over to run in a Docker container the run started to fail saying the file couldn't be found (I've confirmed it is in the container). Do these not work in Docker containers or is there more to get them working?

I used this as my format guide since they seemed to be the same, or close enough that things still worked https://code.visualstudio.com/Docs/editor/tasks#_defining-a-problem-matcher

@damccorm
Copy link
Contributor Author

@ericsciple is there any reason problem matchers wouldn't work in a docker container? I'm not aware of any, but he would know better

@xt0rted
Copy link
Contributor

xt0rted commented Aug 23, 2019

@damccorm I got it working. I switched from ## to :: as per #59 and that fixed it. Both syntaxes worked in script style actions, but container based ones seem to only support ::.


I take that back. The :: syntax doesn't get picked up for problem matchers which is why it wasn't failing. I also realized that I can use core.error() and get the same results so that's what I'm going with now.

@thboop
Copy link
Collaborator

thboop commented Sep 26, 2019

We should cover that these will create annotations, and how else users can create annotations using issues on the toolkit docs!

This was referenced Sep 26, 2019
@xt0rted
Copy link
Contributor

xt0rted commented Sep 26, 2019

@thboop as per my comments above I was unable to use problem matchers in a docker based action. Should that be possible or can you only use problem matchers in javascript based actions?

@thboop
Copy link
Collaborator

thboop commented Sep 26, 2019

@xt0rted, problem matchers should work in actions running in docker. I'll take a look shortly and create a ticket if I'm able to reproduce the issue. Otherwise, do you have an example you can link?

@xt0rted
Copy link
Contributor

xt0rted commented Sep 26, 2019

@thboop after I couldn't get it to work I switched to using log commands since it achieved the same thing.

@thboop
Copy link
Collaborator

thboop commented Sep 30, 2019

@thboop after I couldn't get it to work I switched to using log commands since it achieved the same thing.
@xt0rted sorry for the delay!
We did recently fix a bug where the workspace of actions running in a container was getting set incorrectly (which may have prevented you from registering a problem matcher as it would not be able to locate the file correctly). That being said, Problem Matchers appear to be working fine in containers for me! Please file an issue if you run into the problem again!

@TrueBrain
Copy link

TrueBrain commented Oct 29, 2019

The problem I am having with using Docker for this, that I first need to copy the ProblemMatcher file to the host system:

https://github.com/TrueBrain/actions-flake8/blob/initial_work/entrypoint.sh#L5

I am not sure if this is intended, but every other way resulted in errors. It seems add-matcher uses the host filesystem (which makes sense). But your comments here suggests it should work from within a Docker. Do you have an example how you tested that it worked (so I can cheat from it :D)? Or is my solution the way to go?

@softprops
Copy link

@TrueBrain I hit the same issue. Your workaround for docker based images worked for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants