Create Project API appears to ignore some attributes set

Summary

When attempting to create a project via the Create Project API one of the attributes, builds_access_level, doesn't appear to be consumed and is subsequently ignored in the calls.

The situation where this was discovered in specifically was against a GitLab instance with CI/CD switched off by default at instance level. In this case CI/CD can still be turned on for individual projects either through the UI or the API via the builds_access_level. This doesn't work via Create Project API calls and the flag is still listed as disabled after the project is created.

Other reported attributes that do not work when creating project using API:

  • builds_access_level
  • issues_access_level
  • merge_requests_access_level
  • forking_access_level
  • wiki_access_level
  • snippets_access_level
  • merge_pipelines_enabled

Workaround

Of note though however editing the project after it's created via the API does work for this flag so the assumption is this is a bug.

Steps to reproduce

Attempt to create a project via the API while attempting to change the builds_access_level value to be different from the default.

What is the current bug behavior?

Reported attributes are not honoured and the value isn't updated when the project is created.

What is the expected correct behavior?

Reported attributes are honoured and the value is updated when the project is created.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information
System:		Ubuntu 18.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.6.6p146
Gem Version:	2.7.10
Bundler Version:1.17.3
Rake Version:	12.3.3
Redis Version:	5.0.9
Git Version:	2.28.0
Sidekiq Version:5.2.9
Go Version:	unknown

GitLab information
Version:	13.4.0-pre
Revision:	47b17db82c3
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	11.9
URL:		http://10k.testbed.gitlab.net
HTTP Clone URL:	http://10k.testbed.gitlab.net/some-group/some-project.git
SSH Clone URL:	ssh://git@10k.testbed.gitlab.net:2222/some-group/some-project.git
Elasticsearch:	yes
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers:

GitLab Shell
Version:	13.7.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
- storage1: 	/var/opt/gitlab/git-data/repositories
- storage2: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

Edited by Daphne Kua