question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specific events causes error logs

See original GitHub issue

I understand this is the current approach for handling events but I think it should end without a failure.

if present, the action will exit with a failing status code for any event that is not allowed.

This causes some confusion in the following scenario:

{
  event: [ 'issues.opened' ],
}

In GitHub we cannot specify to run an action on issues.opened we can only run an action on issues. This means that all the actions that run on issues are going to get an error log. Which causes confusion like seen in this issue: https://github.com/alex-page/add-new-issue-project/issues/3

✖  error     Event `issues.assigned` is not supported by this action.

I think these actions should log with a neutral state if the user is using a specific action and they are using the parent event.

I can do a simple work around which is nice:

if( tools.context.payload.action !== 'opened' ){
  tools.exit.neutral( `Event ${ action } is not supported by this action.` )
}

Let me know if you think this is an issue, happy to close it if there is some functionality I don’t understand or reasoning for this approach.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alex-pagecommented, Apr 23, 2019

Yeah definitely, thanks @JasonEtco

1reaction
JasonEtcocommented, Apr 23, 2019

I think that’s the behavior right now - if I make an Action with this:

new Toolkit({ event: 'pull_request.opened' })
workflow "Stuff" {
  on = "pull_request"
}

It will exit with a failure whenever I push the the PR (kicking off a pull_request.synchronize). It should instead exit neutral, otherwise it’ll report a failing status. Does that help clarify things?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting with Windows Logs - The Ultimate Guide To ...
The following events are of particular value in the Security log: ... A likely cause of this error is the operating system stopped...
Read more >
How to Troubleshoot Windows Problems Using Event Viewer ...
Solve Specific Problems Using Logs. Although Event Viewer tells you what caused an error or critical event on your PC, its logs don't...
Read more >
The event logging service encountered an error (Windows 10)
In this article​​ This event generates when event logging service encountered an error while processing an incoming event. It typically generates ...
Read more >
Error Logs: Definition, Content, and Benefits | CrowdStrike
An error log is a file that contains detailed records of error conditions a computer software encounters when it's running. Learn more here....
Read more >
Displaying error and event logs - IBM
You can view error and event logs that are generated by various service processor firmware components. The content of these logs can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found