Create/Edit Slack Service: cannot set 'username' field via API

Summary

Trying to create/edit a Slack Service with the PUT command and body format prescribed in these docs updates all fields except the username.

Steps to reproduce

  1. Created a project
  2. From Postman, created a PUT request with the body as prescribed
  3. Click send

Example Project

https://gitlab.com/mdhornet90/A-Buggy-Project

  • It actually seems even more broken on gitlab.com, I can't even get the "webhook" to stick during update.

What is the current bug behavior?

The username field is neither created nor updated.

What is the expected correct behavior?

That the username field is either created or updated.

Relevant logs and/or screenshots

REQUEST BODY (username previously set to "Why No work?")
{
    "channel" : "dev_channel",
    "webhook" : "http://192.168.0.102:5000",
    "username" : "doesnotmatter"
}

RESPONSE BODY
{
    "id": 7,
    "title": "Slack notifications",
    "created_at": "2017-11-18T20:36:31.738Z",
    "updated_at": "2017-11-19T04:09:22.919Z",
    "active": true,
    "push_events": true,
    "issues_events": true,
    "merge_requests_events": true,
    "tag_push_events": true,
    "note_events": true,
    "pipeline_events": true,
    "job_events": true,
    "properties": {
        "webhook": "http://192.168.0.102:5000",
        "username": "Why No work?",
        "notify_only_broken_pipelines": "0",
        "notify_only_default_branch": "0",
        "push_channel": "",
        "issue_channel": "",
        "confidential_issue_channel": "",
        "merge_request_channel": "",
        "note_channel": "",
        "tag_push_channel": "",
        "pipeline_channel": "",
        "wiki_page_channel": ""
    }
}

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.1.0 Redis Version: 3.2.5 Git Version: 2.13.6 Sidekiq Version:5.0.4 Go Version: unknown

GitLab information Version: 10.1.4 Revision: c887c03 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://11eef1634270 HTTP Clone URL: http://11eef1634270/some-group/some-project.git SSH Clone URL: git@11eef1634270:some-group/some-project.git Using LDAP: no Using Omniauth: no

GitLab Shell Version: 5.9.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

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/21 ... ok 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/21 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.6) Git user has default SSH configuration? ... yes Active users: ... 1

Checking GitLab ... Finished

Possible fixes

¯\(°_o)/¯