Cannot edit/delete branch rule for group protected branch
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Branch rule updation or deletion fails when the rule was created with a group level protected branch.
Steps to reproduce
- Create a protected branch rule at group level
- Create a branch rule on a project with this protected branch
- Edit/delete previously created branch rule using the UI
- Notice the error
Example Project
N/A
What is the current bug behavior?
I'm trying to delete a Branch rule from a project, and I got the following error:
I'm using an instance admin account.
What is the expected correct behavior?
I should be able to edit/delete the branch rule.
Relevant logs and/or screenshots
Graphql request response from the browser console:
{
"errors": [
{
"message": "The resource that you are attempting to access does not exist or you don't have permission to perform this action",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"branchRuleDelete"
]
}
],
"data": {
"branchRuleDelete": null
}
}
Can't find relevant logs inside Gitlab's logs. But if I know where to search, I would add them.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 11 Proxy: no Current User: git Using RVM: no Ruby Version: 3.2.5 Gem Version: 3.5.23 Bundler Version:2.5.11 Rake Version: 13.0.6 Redis Version: 7.0.15 Sidekiq Version:7.2.4 Go Version: unknown GitLab information Version: 17.8.0-ee Revision: f03594b9e09 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 14.15 URL: https://gitlab.kardinal.ai HTTP Clone URL: https://gitlab.kardinal.ai/some-group/some-project.git SSH Clone URL: git@gitlab.kardinal.ai:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.39.0 Repository storages: - default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Gitaly - default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket - default Version: 17.8.0 - default Git Version: 2.47.0
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.39.0 ? ... OK (14.39.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... Checking gitlab@kardinal.ai yes Mailroom enabled? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... 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? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/3 ... yes 915/5 ... yes 8/7 ... yes 6/10 ... yes 915/11 ... yes 6/13 ... yes 6/14 ... yes 6/16 ... yes 6/18 ... yes 2/20 ... yes 6/22 ... yes 2/23 ... yes 2/24 ... yes 10/27 ... yes 6/31 ... yes 2/32 ... yes 11/33 ... yes 11/34 ... yes 11/35 ... yes 11/36 ... yes 11/37 ... yes 11/38 ... yes 6/41 ... yes 915/45 ... yes 2/46 ... yes 6/48 ... yes 6/49 ... yes 2/50 ... yes 10/51 ... yes 6/53 ... yes 10/54 ... yes 10/56 ... yes 915/57 ... yes 10/58 ... yes 915/60 ... yes 6/63 ... yes 8/64 ... yes 4/65 ... yes 6/66 ... yes 6/68 ... yes 11/72 ... yes 11/73 ... yes 915/74 ... yes 915/75 ... yes 6/76 ... yes 6/78 ... yes 6/81 ... yes 8/82 ... yes 6/83 ... yes 18/89 ... yes 6/91 ... yes 6/92 ... yes 6/97 ... yes 915/101 ... yes 6/104 ... yes 6/106 ... yes 4/109 ... yes 6/110 ... yes 23/112 ... yes 2/113 ... yes 915/116 ... yes 11/117 ... yes 11/119 ... yes 6/120 ... yes 28/121 ... yes 28/122 ... yes 6/123 ... yes 915/124 ... yes 4/126 ... yes 6/128 ... yes 6/129 ... yes 4/130 ... yes 30/131 ... yes 10/134 ... yes 2/135 ... yes 6/139 ... yes 915/142 ... yes 6/144 ... yes 8/146 ... yes 6/151 ... yes 30/154 ... yes 37/156 ... yes 38/157 ... yes 28/158 ... yes 38/159 ... yes 40/162 ... yes 41/163 ... yes 6/164 ... yes 6/166 ... yes 915/173 ... yes 915/176 ... yes 18/178 ... yes 915/179 ... yes 6/183 ... yes 6/184 ... yes 4/187 ... yes 2/188 ... yes 6/191 ... yes 6/192 ... yes 30/193 ... yes 48/196 ... yes 48/197 ... yes 48/199 ... yes 915/200 ... yes 8/201 ... yes 6/203 ... yes 10/206 ... yes 48/208 ... yes 6/209 ... yes 6/212 ... yes 48/215 ... yes 6/217 ... yes 6/226 ... yes 48/233 ... yes 6/234 ... yes 6/236 ... yes 51/239 ... yes 51/240 ... yes 51/241 ... yes 51/242 ... yes 51/243 ... yes 48/245 ... yes 51/246 ... yes 40/247 ... yes 6/251 ... yes 6/252 ... yes 915/255 ... yes 8/256 ... yes 6/258 ... yes 915/261 ... yes 8/262 ... yes 6/263 ... yes 55/265 ... yes 6/268 ... yes 4/273 ... yes 4/274 ... yes 6/275 ... yes 6/276 ... yes 55/278 ... yes 48/279 ... yes 6/280 ... yes 915/282 ... yes 55/284 ... yes 6/285 ... yes 48/286 ... yes 30/287 ... yes 915/288 ... yes 7/289 ... yes 61/291 ... yes 6/292 ... yes 8/293 ... yes 6/294 ... yes 4/296 ... yes 6/297 ... yes 6/298 ... yes 62/299 ... yes 63/300 ... yes 64/303 ... yes 6/305 ... yes 6/307 ... yes 6/308 ... yes 55/309 ... yes 4/311 ... yes 4/312 ... yes 6/313 ... yes 30/314 ... yes 62/315 ... yes 4/316 ... yes 4/317 ... yes 62/321 ... yes 30/323 ... yes 6/324 ... yes 67/326 ... yes 62/327 ... yes 67/329 ... yes 67/330 ... yes 6/331 ... yes 4/334 ... yes 6/336 ... yes 30/337 ... yes 48/338 ... yes 48/339 ... yes 6/341 ... yes 64/344 ... yes 6/345 ... yes 30/353 ... yes 30/354 ... yes 915/363 ... yes 6/374 ... yes 6/376 ... yes 30/379 ... yes 6/380 ... yes 6/382 ... yes 6/385 ... yes 484/386 ... yes 30/388 ... yes 6/390 ... yes 484/391 ... yes 484/392 ... yes 484/395 ... yes 484/397 ... yes 30/398 ... yes 484/399 ... yes 6/400 ... yes 4/402 ... yes 67/403 ... yes 48/404 ... yes 5/405 ... yes 511/406 ... yes 48/408 ... yes 484/410 ... yes 4/411 ... yes 521/413 ... yes 6/414 ... yes 6/415 ... yes 6/416 ... yes 531/417 ... yes 6/419 ... yes 484/420 ... yes 59/421 ... yes 531/422 ... yes 484/423 ... yes 484/424 ... yes 6/425 ... yes 672/426 ... yes 536/428 ... yes 62/429 ... yes 4/430 ... yes 672/431 ... yes 672/432 ... yes 4/433 ... yes 4/434 ... yes 7/435 ... yes 672/436 ... yes 552/437 ... yes 552/438 ... yes 555/439 ... yes 555/440 ... yes 555/441 ... yes 6/442 ... yes 4/443 ... yes 536/444 ... yes 555/445 ... yes 672/446 ... yes 567/447 ... yes 567/448 ... yes 555/449 ... yes 571/450 ... yes 571/451 ... yes 484/452 ... yes 62/453 ... yes 6/456 ... yes 6/457 ... yes 48/458 ... yes 48/459 ... yes 62/460 ... yes 48/461 ... yes 6/462 ... yes 634/463 ... yes 6/464 ... yes 555/465 ... yes 555/466 ... yes 6/467 ... yes 4/469 ... yes 6/470 ... yes 484/471 ... yes 59/473 ... yes 62/474 ... yes 59/475 ... yes 62/476 ... yes 6/477 ... yes 577/479 ... yes 577/480 ... yes 4/481 ... yes 566/482 ... yes 6/483 ... yes 614/485 ... yes 614/486 ... yes 614/487 ... yes 484/488 ... yes 484/489 ... yes 621/490 ... yes 621/491 ... yes 621/492 ... yes 484/493 ... yes 484/494 ... yes 6/495 ... yes 6/496 ... yes 484/497 ... yes 634/498 ... yes 555/499 ... yes 637/500 ... yes 6/501 ... yes 6/502 ... yes 6/503 ... yes 484/504 ... yes 531/505 ... yes 637/506 ... yes 637/507 ... yes 566/509 ... yes 566/510 ... yes 637/511 ... yes 646/512 ... yes 646/513 ... yes 536/514 ... yes 566/515 ... yes 656/517 ... yes 662/518 ... yes 664/519 ... yes 662/520 ... yes 571/521 ... yes 669/522 ... yes 662/523 ... yes 662/524 ... yes 531/525 ... yes 662/526 ... yes 646/527 ... yes 677/528 ... yes 6/529 ... yes 64/530 ... yes 661/531 ... yes 662/532 ... yes 6/533 ... yes 62/534 ... yes 688/535 ... yes 661/536 ... yes 688/537 ... yes 692/538 ... yes 664/539 ... yes 664/540 ... yes 48/541 ... yes 688/542 ... yes 6/543 ... yes 699/544 ... yes 48/545 ... yes 6/546 ... yes 531/547 ... yes 702/548 ... yes 707/549 ... yes 709/550 ... yes 47/551 ... yes 655/552 ... yes 702/553 ... yes 664/554 ... yes 664/555 ... yes 724/556 ... yes 6/557 ... yes 731/558 ... yes 733/559 ... yes 30/560 ... yes 64/561 ... yes 6/562 ... yes 59/563 ... yes 32/564 ... yes 745/565 ... yes 747/566 ... yes 6/567 ... yes 733/568 ... yes 531/569 ... yes 702/570 ... yes 923/571 ... yes 915/572 ... yes 928/573 ... yes 928/574 ... yes 928/575 ... yes 933/576 ... yes 935/577 ... yes 724/578 ... yes 656/579 ... yes Redis version >= 6.2.14? ... yes Ruby version >= 3.0.6 ? ... yes (3.2.5) Git user has default SSH configuration? ... yes Active users: ... 26 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled) All migrations must be finished before doing a major upgrade ... skipped (Advanced Search is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished