-
Notifications
You must be signed in to change notification settings - Fork 2
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
[PTFE-433] ✨ Add workflow cost metric #44
[PTFE-433] ✨ Add workflow cost metric #44
Conversation
Codecov Report
@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 96.15% 97.39% +1.23%
==========================================
Files 10 14 +4
Lines 442 537 +95
==========================================
+ Hits 425 523 +98
+ Misses 17 14 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
response = client.post("/webhook", json=workflow_job, headers=headers) | ||
assert response.status_code == 202 | ||
|
||
response = client.post("/webhook", json=workflow_job, headers=headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we run twice the same check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't actually run it twice; it's just that we simulate having a workflow with 2 jobs!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this metric was added, as I fail to see the difference with github_actions_job_cost_count
given that the label workflow_name
is available on it as well.
Would you mind sharing the query you are trying to do?
Certainly, in essence, what I wanted to do with the graph was to display the average cost per workflow, something like this:
As you know, github_actions_workflow_cost_count_total does not exist, so I wanted to add it. Initially, I tried to work around this issue by changing the query and finding an alternative approach, but without success. The information available to us is the cost of each job, the number of jobs, and the number of workflows. Based on that, I don't see how to calculate the average cost of each workflow. If you have any ideas, I'm open to them, and we can simply close this pull request. If we had the number of different jobs within a specific workflow, we could make the calculation, but we don't have that value either. |
Given how you are using this new metrics, you will reach the same result with the existing one:
Checkout how a graph can look like with it: https://mon.scality.net/grafana/d/WidbLgPnk/github-actions-monitoring?orgId=1&refresh=30s&viewPanel=72 |
No description provided.