question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Not Found error when running danger with GitLab CE without MR approvals API

See original GitHub issue

Describe the bug Our builds have started failing with the following error since using v10.6.2:

Error:  { HTTPError: Not Found
    at fn (/root/.npm/_npx/15/lib/node_modules/danger/node_modules/ky/umd.js:266:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'HTTPError',
  response:
   Response {
     size: 0,
     timeout: 0,
     [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
     [Symbol(Response internals)]:
      { url:
         'https://$GITLAB/api/v4/projects/$PROJECT/merge_requests/579/approvals',
        status: 404,
        statusText: 'Not Found',
        headers: [Headers],
        counter: 0 } },
  description: '404 Not Found' }

To Reproduce Steps to reproduce the behavior:

  1. Execute danger with selfhosted GitLab CE without MR approvals API (for example 12.8.6)
  2. Above error will occur

Expected behavior

Danger shouldn’t fail, either by allowing the user to configure skipping using this approvals API or ignoring the error and carrying on without these API results. Or maybe there is a more elegant solution that I am not thinking of at the moment.

Screenshots If applicable, add screenshots to help explain your problem.

Your Environment

software version
danger.js 10.6.2
node 10.23.2
Operating System swift:5.2 docker image (Ubuntu 18.04)
Gitlab GitLab Community Edition 12.8.6

Additional context Also according to https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals this API will be moved to GitLab Premium only in 13.9, so expecting the API to exist/work might become problematic then as well. Probably introduced in #1098.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iShawnWangcommented, Mar 29, 2021

Any update here ? Facing the same problem in GitLab Community Edition 13.0.10

0reactions
cangSDARMcommented, Nov 17, 2021

Is resolving yet? Currently in gitlab(11.9.9) and danger(10.7.1) this issue still exists. Danger try to fetch “api/v4/projects/person%2Fproject/merge_requests/1/approvals”

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Not Found error when running danger with GitLab CE without ...
Danger shouldn't fail, either by allowing the user to configure skipping using this approvals API or ignoring the error and carrying on without...
Read more >
Merge request approvals API - GitLab Docs
Moved to GitLab Premium in 13.9. You can request information about a project's approval configuration using the following endpoint: GET /projects/:id/approvals.
Read more >
MR approvers are missing from the MR approval state API ...
Make a change in the project and create a new merge request; Approve the merge request; Access the approval state API and observe...
Read more >
Troubleshooting CI/CD - GitLab Docs
If a pipeline does not seem to run at all, with no error message, it may also be due to rules or only/except...
Read more >
Danger bot - GitLab Docs
If an error happens, the CI job (and so the entire pipeline) fails. ... Danger is run but its output is not added...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found