Hello there!
Thanks for the development of this plugin, and especially for the recent Dependency Graph Submission feature - it's pretty useful to make Dependabot work with Gradle.
While configuring the workflow, I experienced the issue that happens in the post-action stage:
Warning: Unhandled error in Gradle post-action - job will continue: HttpError: Not Found
HttpError: Not Found
at /runner/_work/_actions/gradle/gradle-build-action/v2/dist/post/index.js:50[98]
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Some context:
- it happens for the GitHub Enterprise Server (we using v.3.8.1)
- our workflow setup looks like this:
name: Gradle Dependency Submission
on:
push:
branches:
- main
jobs:
gradle-action-detection:
runs-on: [ ubuntu-latest ]
permissions:
contents: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: corretto
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/gradle-build-action@v2
with:
dependency-graph: generate-and-submit
- name: Run a build, generating the dependency graph snapshot which will be submitted
run: ./gradlew build
The provided error happens for the Post Setup Gradle to generate and submit dependency graphs step.
Based on the logs, I can see that the error is originated here:
await submitDependencyGraphs(await uploadDependencyGraphs())
when the submitDependencyGraphs method is called.
I noticed that there is the exact endpoint hardcoded, so I wonder whether that could be somehow related to the differences between the regular GitHub and GitHub Enterprise: according to the GitHub Docs, there is a slight diff:
- regular GitHub:
https://api.github.com/repos/OWNER/REPO/dependency-graph/snapshots
- GitHub Enterprise:
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/dependency-graph/snapshots
Maybe, it seems like this might be somehow resolved by the Octokit library you are using under the hood. However, I didn't manage to find the answer while browsing the codebase.
Also, I double-checked that:
- the Dependency Submission endpoint is available within our GitHub server
- tried calling it with different scenarios via
curl (without a token, without /api/v3, with the wrong token), and I can't get a Not found response from it - so it doesn't seem to be some permissions-related issue.
Question:
Is it me doing something wrong, or is it something that is not supported by this action?
Any help here is appreciated.
Thanks a lot!
Hello there!
Thanks for the development of this plugin, and especially for the recent Dependency Graph Submission feature - it's pretty useful to make Dependabot work with Gradle.
While configuring the workflow, I experienced the issue that happens in the post-action stage:
Some context:
The provided error happens for the
Post Setup Gradle to generate and submit dependency graphsstep.Based on the logs, I can see that the error is originated here:
when the
submitDependencyGraphsmethod is called.I noticed that there is the exact endpoint hardcoded, so I wonder whether that could be somehow related to the differences between the regular GitHub and GitHub Enterprise: according to the GitHub Docs, there is a slight diff:
https://api.github.com/repos/OWNER/REPO/dependency-graph/snapshotshttp(s)://HOSTNAME/api/v3/repos/OWNER/REPO/dependency-graph/snapshotsMaybe, it seems like this might be somehow resolved by the
Octokitlibrary you are using under the hood. However, I didn't manage to find the answer while browsing the codebase.Also, I double-checked that:
curl(without a token, without/api/v3, with the wrong token), and I can't get aNot foundresponse from it - so it doesn't seem to be some permissions-related issue.Question:
Is it me doing something wrong, or is it something that is not supported by this action?
Any help here is appreciated.
Thanks a lot!