-
Notifications
You must be signed in to change notification settings - Fork 14
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
Missing explicit check for workflow status failure #230
Comments
Yes, 0 should be used for failure. This is something that needs to be properly documented. |
Something seems to be wrong with the status reported. I'll have to debug for details but it seems that when the workflow is |
@tboerger I've added the following log: And testing by running a workflow and querying the /metrics endpoint from a local build. Doesn't matter if the Github status is Queued or In Progress, the log is:
It seems the lib used for querying the API returns and empty string in this case... |
The label |
@tboerger I've pushed a small PR for the above scenario. Let me know what you think. |
Please give it a try with the latest tag of the image, this should work now. After getting it confirmed by you I would tag the new release v2.3.0 |
@tboerger Thanks! Tried the |
@tboerger will you have time to push the v2.3.0 release? |
Since nobody complained about it I think I will roll a release after merging #236 and updating the changelog. |
I have just pushed v2.3.0, will be available in a few minutes. |
The workflow status is documented to have 14 unique values: completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending
Ref: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28
From looking at the code:
github_exporter/pkg/exporter/workflow.go
Lines 273 to 304 in d3cef39
There is no check if the conclusion is failure and the only way to match against that is to use 0 as a failure status.
Is this expected?
The text was updated successfully, but these errors were encountered: