Upgrading to API V4 Project Creation for user Fails
Summary
Creating a project for a user using POST /api/v4/projects/user/:userid
fails with a 500 error "NoMethodError (undefined method 'saved?' for nil:NilClass):" on this line https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb#L160 HOWEVER this works with v3 POST /api/v3/projects/user/:userid
Steps to reproduce
- Use the docker OmnibusGitLab Docker image to launch a GitLab instance in your docker stack (I tried both
gitlab-ce:10.1.0-ce.0
andgitlab-ce:10.7.0-rc7.ce.0
) - Create an admin user
- Create a normal user
- Use a client (I used the golang https://github.com/xanzy/go-gitlab client) configured as V3 to point to your local GitLab instance to create a project for the normal user as the admin user
- Notice it succeeds
- Update the client code to use
V4
and create a new project for the normal user as the admin user - Notice it fails
I am also able to recreate it using CURL:
curl -H "Authorization: Bearer <valid_token>" -d "container_registry_enabled=true&description=&issues_enabled=false&jobs_enabled=false&lfs_enabled=false&merge_requests_enabled=false&name=MyNewProject1&public_jobs=false&request_access_enabled=false&shared_runners_enabled=false&snippets_enabled=false&visibility=private&wiki_enabled=false" -X POST http://mygitlab.local/api/v3/projects/user/2
{"id":2,"description":"","default_branch":null,"tag_list":[],"public":false,"archived":false,"visibility_level":0,"ssh_url_to_repo":"ssh://git@--------.git","http_url_to_repo":"http://-------.git","web_url":"http://--------","owner":{"id":2,"name":"benno","username":"benno","state":"active","avatar_url":"http://www.gravatar.com/avatar/5c3a209e99dd79a6c69fec6f543fb6eb?s=80&d=identicon","web_url":"http://mygitlab.local/benno"},"name":"23eaf7054fed6937841c4a7bf915a7ddb2c4d5XAZ","name_with_namespace":"benno / ----","path":"----","path_with_namespace":"benno/----","resolve_outdated_diff_discussions":false,"container_registry_enabled":true,"issues_enabled":false,"merge_requests_enabled":false,"wiki_enabled":false,"builds_enabled":true,"snippets_enabled":false,"created_at":"2018-04-19T20:51:37.242Z","last_activity_at":"2018-04-19T20:51:37.242Z","shared_runners_enabled":false,"lfs_enabled":false,"creator_id":2,"namespace":{"id":2,"name":"benno","path":"benno","kind":"user","full_path":"benno","parent_id":null},"avatar_url":null,"star_count":0,"forks_count":0,"runners_token":"-----","public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false,"request_access_enabled":false,"only_allow_merge_if_all_discussions_are_resolved":false}
VS
curl -H "Authorization: Bearer <valid token>" -d "container_registry_enabled=true&description=&issues_enabled=false&jobs_enabled=false&lfs_enabled=false&merge_requests_enabled=false&name=MADEWITHV4XXXX&public_jobs=false&request_access_enabled=false&shared_runners_enabled=false&snippets_enabled=false&visibility=private&wiki_enabled=false" -X POST http://mygitlab.local/api/v4/projects/user/2
{"message":"500 Internal Server Error"}
Same exact request, V3 works, V4 does not. See the exact stack trace of the 500 error below.
Example Project
I can't do it on GitLab proper because I need an admin user
What is the current bug behavior?
500 exception.
What is the expected correct behavior?
It should create the user like it does with V3 in the URL.
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/api_json.log <==
{"time":"2018-04-19T19:12:05.445Z","severity":"INFO","duration":27.04,"db":1.86,"view":25.18,"status":500,"method":"POST","path":"/api/v4/projects/user/2","params":{"container_registry_enabled":true,"description":"","issues_enabled":false,"jobs_enabled":false,"lfs_enabled":false,"merge_requests_enabled":false,"name":"randomgibberish","public_jobs":false,"request_access_enabled":false,"shared_runners_enabled":false,"snippets_enabled":false,"visibility":"private","wiki_enabled":false},"host":"--------","ip":"------","ua":"go-gitlab/0.2.0","user_id":1,"username":"root"}
==> /var/log/gitlab/gitlab-rails/production.log <==
NoMethodError (undefined method `saved?' for nil:NilClass):
/opt/gitlab/embedded/service/gitlab-rails/lib/api/projects.rb:160:in `block (2 levels) in <class:Projects>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:57:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:57:in `block (2 levels) in generate_api_method'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:56:in `block in generate_api_method'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:262:in `block in run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:243:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:313:in `block in build_stack'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:31:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:31:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:60:in `block in call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource.rb:20:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/error.rb:37:in `block in call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/error.rb:36:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/error.rb:36:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/head.rb:13:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:227:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/endpoint.rb:221:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router/route.rb:72:in `exec'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:121:in `process_route'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:74:in `block in identity'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:93:in `transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:72:in `identity'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:57:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:137:in `with_optimization'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/router.rb:56:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/api.rb:119:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/api.rb:45:in `call!'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/grape-1.0.2/lib/grape/api.rb:40:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/mapper.rb:51:in `serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:817:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/peek-performance_bar-1.3.1/lib/peek/views/performance_bar/process_utilization.rb:119:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/multipart.rb:95:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/request_profiler/middleware.rb:14:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/go.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/flipper-0.13.0/lib/flipper/middleware/memoizer.rb:64:in `memoized_call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/flipper-0.13.0/lib/flipper/middleware/memoizer.rb:42:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/etag_caching/middleware.rb:11:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/batch-loader-1.2.1/lib/batch_loader/middleware.rb:11:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/etag.rb:24:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/conditionalget.rb:38:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/head.rb:13:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/read_only/controller.rb:28:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/read_only.rb:16:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/session/abstract/id.rb:225:in `context'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/session/abstract/id.rb:220:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/query_cache.rb:36:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:38:in `call_app'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:26:in `tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `tagged'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/request_context.rb:18:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/methodoverride.rb:22:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/runtime.rb:18:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/lock.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/sendfile.rb:113:in `call'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.7.2/lib/raven/integrations/rack.rb:51:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:518:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/application.rb:165:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `public_send'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `method_missing'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/release_env.rb:10:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/urlmap.rb:66:in `block in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/urlmap.rb:50:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rack-1.6.9/lib/rack/urlmap.rb:50:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-worker-killer-0.4.4/lib/unicorn/worker_killer.rb:52:in `process_client'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/opt/gitlab/embedded/bin/unicorn:23:in `load'
/opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Results of GitLab application Check
Expand for output related to the GitLab application check
root@acf142c69d38:/# gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...
GitLab Shell version >= 5.9.3 ? ... OK (5.9.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... repository is empty 2/2 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 2/2 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... yes Active users: ... 2
Checking GitLab ... Finished
Longer explanation:
The issue is that when attempting to upgrade our API URLs from V3 to V4 (as instructed by the fact that V3 is now deprecated) we are getting 500 errors on requests that worked perfectly as V3 but fail as V4. Specifically POST /api/v4/projects/user/:userid
which we use to create new projects. It seems that V3 still working, and this is true on the newest version of of GitLab (we're upgrading to 10.7.0-rc7.ce.0
) and the one we've been using for months (gitlab-ce:10.1.0-ce.0
), which is contrary to the documentation. We are using https://github.com/xanzy/go-gitlab which claims to not have support for V3 and only supports V4 which makes this extra confusing as it continues to actually work for v3 but not for v4. I don't think think it's a client error, because the HTTP request in the GitLab log looks good and matches both the v3 and v4 docs as expected.
You can see the full RoR stack trace above: it seems that the project
constructor is returning nil unexpectedly here https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb#L160