Type error: "no implicit conversion of nil into String"
Summary
I tried the fresh image built from your master branch and running into a type error when I want to manually add a project through the api
. Same goes for webhooks.
Steps to reproduce
- Deploy dependabot to a server of your choice
version: "3.3"
services:
redis:
image: redis:6.0.6-buster
volumes:
- /data/gitlab/dependabot/redis:/data
networks:
- redis
web:
image: registry.gitlab.com/dependabot-gitlab/dependabot:master-latest
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379
- RAILS_ENV=production
- SETTINGS__GITLAB_URL=xxxx
- SETTINGS__GITLAB_ACCESS_TOKEN=xxxx
- RAILS_SERVE_STATIC_FILES="true"
- SECRET_KEY_BASE="key"
command: rails server
networks:
- redis
worker:
image: registry.gitlab.com/dependabot-gitlab/dependabot:master-latest
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379
- RAILS_ENV=production
- SETTINGS__GITLAB_ACCESS_TOKEN=xxxx
command: sidekiq
networks:
- redis
networks:
redis:
internal: true
- Setup reverse-proxy access or just port-mapping to get access
- Try to schedule a project through
POST /api/project
gives (the same is true if we run over a gitlab webhook request) POST request
{
"project":"rweinreich/dependabot-test"
}
Response
{
"status": 500,
"error": "no implicit conversion of nil into String"
}
Logs
[2020-09-02 08:34:35 +0000 pid=1 tid=gsh14isep] INFO: [3cf34e06-194b-46a9-a2f2-9fc3919b1a34] Started POST "/api/project" for 84.118.233.38 at 2020-09-02 08:34:35 +0000
[2020-09-02 08:34:35 +0000 pid=1 tid=gsh14isep] INFO: [3cf34e06-194b-46a9-a2f2-9fc3919b1a34] Processing by Api::ProjectController#create as JSON
[2020-09-02 08:34:35 +0000 pid=1 tid=gsh14isep] INFO: [3cf34e06-194b-46a9-a2f2-9fc3919b1a34] Parameters: {"project"=>"rweinreich/dependabot-test"}
[2020-09-02 08:34:35 +0000 pid=1 tid=gsh14isep] INFO: [3cf34e06-194b-46a9-a2f2-9fc3919b1a34] Completed 500 Internal Server Error in 0ms (Views: 0.2ms | Allocations: 131)
Edited by George Koltsov