Cannot enable project features with the API
Summary
The projects
API exposes a number of parameters which map to project features:
builds_enabled
wiki_enabled
- etc.
As of 8.12.2, these settings can no longer be enabled from the API. Instead, the feature is always disabled. With builds_enabled
as an example, any attempt to set it using PUT /projects/:id
results in it being set to false
.
Steps to reproduce
- Create a new project using the API, noting the project's ID in the return JSON
- Use the API to
PUT /projects/:id
with{"builds_enabled": true}
- Verify that
"builds_enabled": false
is in the return JSON - Repeat steps 2 and 3
- Enable the
builds
feature in the GUI, and repeat steps 2 and 3, and verify in the GUI that the feature has been disabled
Expected behavior
Setting these flags in the API to true
should result in them being saved that way.
Actual behavior
Setting the feature switches which are exposed always results in a false
value.
Relevant logs and/or screenshots
Output of checks
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 3.6.0 ? ... OK (3.6.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/1 ... ok
4/2 ... repository is empty
4/3 ... repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... 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: ...
4/1 ... yes
4/2 ... yes
4/3 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 3
Checking GitLab ... Finished
Results of GitLab environment info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.1
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.12.2
Revision: c9cd78b
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://<REDACTED>
HTTP Clone URL: https://<REDACTED>/some-group/some-project.git
SSH Clone URL: git@<REDACTED>:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: saml
GitLab Shell
Version: 3.6.0
Repository storage paths:
- default: /gitlab_data/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git