Skip to content

fix(github_graphql): add missing runId for graphql jobs #8420

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

Merged
merged 4 commits into from
May 12, 2025

Conversation

kostas-petrakis
Copy link
Contributor

@kostas-petrakis kostas-petrakis commented May 1, 2025

Summary

This PR addresses a regression in the GitHub GraphQL API job collection introduced by issues #8383 and #8233. The regression caused the runID of the GraphQL extracted job to incorrectly reference the job ID instead of the workflow run ID, leading to empty DORA metrics.

Changes
Introduced a new DAL struct to correctly store theRunID for GitHub GraphQL collected jobs.

Does this close any open issues?

Closes #8415

Screenshots

{
  "RunId": 14767773733,
  "Id": "******",
  "Name": "*******",
  "DetailsUrl": "https://github.com/*****/*****/actions/runs/14767773733/job/41462433961",
  "DatabaseId": 41462433961,
  "Status": "COMPLETED",
  "StartedAt": "2025-05-01T01:29:58Z",
  "Conclusion": "SUCCESS",
  "CompletedAt": "2025-05-01T01:36:13Z",
  "Steps": {
    "TotalCount": 1,
    "Nodes": [
      {
        "completed_at": "2025-05-01T01:30:00Z",
        "conclusion": "SUCCESS",
        "name": "****",
        "number": 1,
        "seconds_to_completion": 2,
        "started_at": "2025-05-01T01:29:58Z",
        "status": "COMPLETED"
      }
    ]
  }
}

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug labels May 1, 2025
@kostas-petrakis
Copy link
Contributor Author

kostas-petrakis commented May 6, 2025

Hi people! Just a kind reminder for a review here, the current GitHub GraphQL implementation is affecting DORA metrics calculation, additionally the fix will require a re-collection in full refresh mode for repos as the currently collected runId is incorrect.

@kostas-petrakis
Copy link
Contributor Author

kostas-petrakis commented May 8, 2025

@narrowizard or @klesh kind reminder for someone to review this PR, DORA calculations are broken currently for GitHub GraphQL

@klesh klesh merged commit e478bd5 into apache:main May 12, 2025
10 checks passed
@klesh
Copy link
Contributor

klesh commented May 12, 2025

@kostas-petrakis LGTM! Thanks so much for your contribution. It's a valuable addition to the project. I'd like to nominate you to become an Apache Committer. Are you interested? If so, please reach out to me on Slack so we can discuss the next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][GitHub] Switching to GraphQL results in no DORA metrics
2 participants