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

Irregularities in github_workflow_run_status #45

Open
hsolberg opened this issue Jun 29, 2022 · 2 comments
Open

Irregularities in github_workflow_run_status #45

hsolberg opened this issue Jun 29, 2022 · 2 comments

Comments

@hsolberg
Copy link

hsolberg commented Jun 29, 2022

Hi!

According to the documentation the expected values from github_workflow_run_status is either 0 (failed), 1 (success), 2 (skipped) or 3 (in_progress). When we look at the metrics we only see values of 0 or 1 even though the runners have been observed with other states. The runners show the state long enough to expect the metric to change the value to 3.

Running $ gh run list --json name,status,conclusion reveals the problem. Seems the conclusion-field is only updated by GitHub Actions when the status-field is set to "completed".

  {
    "conclusion": "",
    "name": "Build repo",
    "status": "queued"
  },
  {
    "conclusion": "",
    "name": "Build repo",
    "status": "in_progress"
  },
  {
    "conclusion": "",
    "name": "Build repo",
    "status": "pending"
  },
  {
    "conclusion": "success",
    "name": "Build repo",
    "status": "completed"
  }

Looking at the code it seems the conclusion-field is used to set the value of the metric which explains why we only observe values of 0 or 1. Also 0 is used as a "catch all other status-variants" it seems?
I think it would be better to split this into separate metrics per status instead. That way you'll get a total number for metrics with the state "in_progress" for instance. github_workflow_run_in_progress with a counter of number of runners with that state so it's possible to sum+rate the metric.

I noticed it's a long time since the last release and any activity in general on the project, so I'm also wondering if this project is considered abandoned or just lacking feedback from users in general?

@deebsman
Copy link

I've hit this problem myself.

@hsolberg
Copy link
Author

@moutonjeremy I noticed the updated README.md regarding changes to maintainers/project owners etc. Anyone on the new team that could take a look at this issue? Any progress towards solving this issue would be highly appreciated and please do reach out if the description is unclear. 🙂

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

No branches or pull requests

2 participants