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

Error for query for "Workflow Usage" on GitHub Enterprise #347

Open
thomgun opened this issue Aug 8, 2024 · 3 comments
Open

Error for query for "Workflow Usage" on GitHub Enterprise #347

thomgun opened this issue Aug 8, 2024 · 3 comments
Labels
type/bug Unexpected behavior or a feature is broken

Comments

@thomgun
Copy link

thomgun commented Aug 8, 2024

Hi,
when using the grafana-github-dashboard with a github enterprise instance, and querying the workflow usage, an error workflow not found is shown:
image

Debug log output of local running grafana:

DEBUG[08-08|17:25:05] Querying for data source via SQL store   logger=datasources uid=adtmeuufa93i8d orgId=1
DEBUG[08-08|17:25:05] Processed metrics query                  logger=query_data ref_id=A from=1723044305012 to=1723130705012 interval=30000 max_data_points=2122 query="{\"datasource\":{\"type\":\"grafana-github-datasource\",\"uid\":\"adtmeuufa93i8d\"},\"datasourceId\":1,\"intervalMs\":30000,\"maxDataPoints\":2122,\"options\":{\"workflow\":\"11559\"},\"owner\":\"i3\",\"queryType\":\"Workflow_Usage\",\"refId\":\"A\",\"repository\":\"i3-access\"}"
DEBUG[08-08|17:25:05] got secret value                         logger=secrets.kvstore orgId=1 type=datasource namespace=grafana-github-datasource
DEBUG[08-08|17:25:05] Error response                           logger=plugin.grafana-github-datasource error="workflow not found" errorsource=downstream
ERROR[08-08|17:25:05] Plugin Request Completed                 logger=plugin.grafana-github-datasource dsName=grafana-github-datasource endpoint=queryData status=error statusSource=downstream dsUID=adtmeuufa93i8d duration=225.023487ms pluginID=grafana-github-datasource uname=admin
INFO [08-08|17:25:05] Request Completed                        logger=context userId=1 orgId=1 uname=admin method=POST path=/api/ds/query status=400 remote_addr=[::1] time_ms=229 duration=229.567887ms size=101 referer="http://localhost:3000/explore?orgId=1&panes=%7B%22bx4%22%3A%7B%22datasource%22%3A%22adtmeuufa93i8d%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22datasource%22%3A%7B%22type%22%3A%22grafana-github-datasource%22%2C%22uid%22%3A%22adtmeuufa93i8d%22%7D%2C%22queryType%22%3A%22Workflow_Usage%22%2C%22repository%22%3A%22i3-access%22%2C%22owner%22%3A%22i3%22%2C%22options%22%3A%7B%22workflow%22%3A%2231022%22%7D%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-24h%22%2C%22to%22%3A%22now%22%7D%7D%7D&schemaVersion=1" handler=/api/ds/query status_source=downstream

The workflow id is correct; when query with a not existing workflow id, another error fetching workflow runs: workflow not found is shown:
image

Also other queries like Workflows or Issues work as expected.
If using github.com, the query works as expected.

Is there a way to debug this further or to get more information about the error?

Thomas Gunsch, [email protected] Mercedes-Benz Tech Innovation GmbH PROVIDER_INFORMATION

@ivanahuckova ivanahuckova moved this to Backlog in OSS Big Tent Aug 12, 2024
@ivanahuckova ivanahuckova added the type/bug Unexpected behavior or a feature is broken label Aug 12, 2024
@mert-ozturk-lgs
Copy link

Thanks for reporting this. I just encountered the same issue.

@antoinewass
Copy link

Hi, i'm also experiencing this issue, I can see the workflows on "workflows" query, but it is not found when using the "workflows usage" query.

@thomgun
Copy link
Author

thomgun commented Nov 22, 2024

Hi,
I investigate a little more, and it seems to be that the used github API Get workflow usage don't exists on GHE (which seems to be a little obvous)

Is there any chance that a new Query for "Workflow Runs", which returns the Workflow runs for a workflow , will be available in future ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Unexpected behavior or a feature is broken
Projects
Status: Backlog
Development

No branches or pull requests

4 participants