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
[Bug][Github] Github deployments without Github Actions #7435
Comments
I think we do collect Github Deployment as well
Select the CICD entities in the configuration and it should be good to go, just ignore the Github Action if you don't need them. |
Maybe I misunderstood the code (I haven't taken a deep look) but it looks like that is only used by the graphql implementation but in our case we are using the "plain api".
We tried this, we have 2 projects :
In the first case we don't get any deployment information shown in devlake/grafana dashboards but on the second case we do get the information which is what pointed me to the distinction mentioned on the bug description. Please let me know if I can provide you some debug logs or similar to further clarify this :) |
Sure thing, here you go. ghe+actions.json The first file is the one where deployments are made with github actions; whereas the second one is where the deployments are made outside of it. On the json files I can see that "Collect Workflow Runs" is a subtasks but there is no "Collect Deployments" or similar. |
I see, did you disable the github graphql feature on the connection detail? |
Try enable it and see if the problem got fixed. |
just tried it but unfortunately it crashes. See logs below time="2024-05-14 08:46:28" level=info msg=" [pipeline service] [pipeline #87] [task #618] start executing task: 618"
time="2024-05-14 08:46:28" level=info msg=" [pipeline service] [pipeline #87] [task #618] start plugin"
time="2024-05-14 08:46:28" level=info msg=" [pipeline service] [pipeline #87] [task #618] [api async client] creating scheduler for api \"https://github.boschdevcloud.com/api/v3/\", number of workers: 13, 9500 reqs / 1h0m0s (interval: 378.947368ms)"
time="2024-05-14 08:46:28" level=error msg=" [pipeline service] [pipeline #87] [task #618] run task failed with panic\n\tcaused by: run task failed with panic (github.com/apache/incubator-devlake/helpers/pluginhelper/api.CreateAsyncGraphqlClient:71)\n\tWraps: (2) non-200 OK status code: 404 Not Found body: \"{\\\"message\\\":\\\"Not Found\\\",\\\"documentation_url\\\":\\\"https://docs.github.com/enterprise-server@3.11/rest\\\"}\"\n\tWraps: (3) non-200 OK status code: 404 Not Found body: \"{\\\"message\\\":\\\"Not Found\\\",\\\"documentation_url\\\":\\\"https://docs.github.com/enterprise-server@3.11/rest\\\"}\"\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *errors.errorString"
|
Seems like you are using the enterprise version, is it Cloud or On-premise? |
GitHub Enterprise Server 3.11.9 (OnPremise) |
It sounds like there might be some specific behaviors with GitHub Enterprise Server 3.11.9 (On-Premise). Unfortunately, since we don't currently have access to this version for testing, it limits our ability to directly replicate the issue. Here are a few ways we can move forward: Community Resources: Have you checked the GitHub Enterprise Server documentation or community forums for known quirks or workarounds related to your specific version? There might be existing solutions or insights from other users. |
Hello @klesh ,
Would it be possible for devlake to handle that case with a default value or another method which avoid a panic? I can also contact the administrators on our side and ask if they can set one but since this is the default behavior from Github Server I would assume that this wouldn't be an isolated case. |
@carocad Sure, you may find the "Custom Rate Limit" on the connection page. |
Unfortunately that didn't work either. See logs below
I can only assume from this that DevLake would check the rate limit endpoint regardless of the custom rate limit and only after it receives a response it would then overwrite it. If you agree that this is a bug, I would happily try to create a PR to fix it :) |
I just got an answer from the administrators on my site. The GraphQL endpoints on our side already have a rate limit so this shouldn't be the case. I also tried querying it myself and got an response without any issues. I submitted from the github.com docs (see ref) query {
viewer {
login
}
rateLimit {
limit
remaining
used
resetAt
}
} response {
"data": {
"viewer": {
"login": "<redacted>"
},
"rateLimit": {
"limit": 5000,
"remaining": 4999,
"used": 1,
"resetAt": "2024-05-21T10:17:01Z"
}
}
} I don't know which query does dev-lake uses but I can only guess that one of the fetched parameters was introduced on a version of github newer than |
Do you run this query
run task failed with panic\n\tcaused by: run task failed with panic (github.com/apache/incubator-devlake/helpers/pluginhelper/api.CreateAsyncGraphqlClient:71)\n\tWraps: (2) non-200 OK status code: 404 Not Found body: "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/enterprise-server@3.11/rest\\\"}\"\n\tWraps: (3) non-200 OK status code: 404 Not Found body: "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/enterprise-server@3.11/rest\\\"}\"\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *errors.errorString" I think it's your github version doesn't support to query rate limit info. You can have a try. And btw, DevLake's query is:
|
On my github enterprise version of course :)
Yeah, it works on my github enterprise version. That query seems like a subset of the one I posted above on #7435 (comment) (see response section). |
Search before asking
What happened
The devlake documentation says that Github deployment are read in order to compute DORA metrics. However, in several of my (private) projects, I have Github deployments that are created without using Github Actions. In those cases, devlake doesn't detect the Deployments as (it seems to) assume that Deployments can only come from Github Actions as seen here.
What do you expect to happen
devlake should take the Deployment information from the Github Deployment API not from the Github Actions API; see docs. As per the previous docs it is possible to create Github deployments without using Github actions.
How to reproduce
Anything else
See steps above. It happens every time even with the latest version
Version
v1.0.0-beta6
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: