Unexpected 404 when attempting to delete pipeline subscription from downstream project
Summary
Clicking the red X to delete a pipeline subscription yields a 404
under a specific set of circumstances.
- Imagine you are updating the settings for a project at
root/hello-world
. In this project, you add a Pipeline subscription for a project atroot/cute-cats
. - You then browse to the Pipeline subscriptions for
root/cute-cats
and click the red X to delete the pipeline subscription. - You get a
404
because the deletion should happen in theroot/hello-world
project, not in theroot/cute-cats
project.
Steps to reproduce
- Create two Public projects (
root/hello-world
androot/cute-cats
in this example) - In the
root/hello-world
project, browse to Settings > CI/CD and expand Pipeline subscriptions - In the Project path field, add
root/cute-cats
and click Subscribe - Observe that the
cute-cats
project appears as a Subscription - Browse to the
root/cute-cats
project and navigate to Settings > CI/CD and expand Pipeline subscriptions - Observe that the
hello-world
project is listed there as a Subscription - Click the red X to delete
hello-world
- Observe that a
HTTP 404
is returned - Browse to the
root/hello-world
project, navigate to Settings > CI/CD and expand Pipeline subscriptions - Observe that the Subscription for
cute-cats
is still present - Click the red X to delete the subscription for
cute-cats
- Observe that
Subscription successfully deleted.
message
Example Project
What is the current bug behavior?
In step 8 a 404
is thrown when attempting to delete a Subscription when navigating to the project that the other project is subscribed to.
What is the expected correct behavior?
We could instead provide a helpful error message indicating that the deletion needs to happen in the project where the Subscription was created.
Taking a step back: it would be super helpful if the Pipeline subscriptions section made it clear whether a subscription was upstream or downstream. There's no way to tell from the Web interface the relationship between the subscribing project and the project that has been subscribed to.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
This happens on 14.6.0 and 14.0.12.
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.7.5p203 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.6 Redis Version: 6.0.16 Git Version: 2.33.1. Sidekiq Version:6.3.1 Go Version: unknown GitLab information Version: 14.6.0-ee Revision: 518f728f72b Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.7 URL: https://gitlab.example.com HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git SSH Clone URL: git@gitlab.example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.22.1 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
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 >= 13.22.1 ? ... OK (13.22.1) Running /opt/gitlab/embedded/service/gitlab-shell/bin/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: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 8 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
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? ... 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/1 ... yes 12/2 ... yes 12/3 ... yes 12/4 ... yes 12/5 ... yes 12/6 ... yes 12/7 ... yes 12/8 ... yes 13/9 ... yes 13/10 ... yes 13/11 ... yes 13/12 ... yes 14/13 ... yes 14/14 ... yes 14/15 ... yes 15/16 ... yes 15/17 ... yes 15/18 ... yes 15/19 ... yes 1/22 ... yes 16/24 ... yes 19/25 ... yes 1/26 ... yes 1/27 ... yes 1/28 ... yes 1/29 ... yes 1/30 ... yes 1/31 ... yes 16/32 ... yes 21/33 ... yes 16/34 ... yes 23/35 ... yes 22/36 ... yes 22/37 ... yes 22/38 ... yes 22/39 ... yes 22/40 ... yes 22/41 ... yes 22/42 ... yes 22/43 ... yes 25/44 ... yes 25/45 ... yes 25/46 ... yes 25/47 ... yes 2/48 ... yes 28/49 ... yes 30/50 ... yes 31/51 ... yes 32/52 ... yes 22/53 ... yes 34/54 ... yes 33/55 ... yes 36/56 ... yes 35/57 ... yes 35/58 ... yes 37/59 ... yes 18/62 ... yes 38/63 ... yes 38/64 ... yes 35/65 ... yes 33/66 ... yes 33/67 ... yes 43/68 ... yes 44/69 ... yes 44/70 ... yes 47/71 ... yes 57/72 ... yes 54/73 ... yes 60/74 ... yes 61/75 ... yes 52/76 ... yes 71/77 ... yes 71/79 ... yes 71/80 ... yes 71/81 ... yes 18/82 ... yes 18/83 ... yes 18/84 ... yes 75/85 ... yes 71/86 ... yes 81/87 ... yes 82/88 ... yes 71/89 ... yes 81/90 ... yes 86/91 ... yes 88/92 ... yes 88/93 ... yes 99/94 ... yes 99/95 ... yes 99/96 ... yes 100/97 ... yes 100/98 ... yes 111/99 ... yes 111/100 ... yes 111/101 ... yes 112/102 ... yes 112/103 ... yes 147/104 ... yes 147/105 ... yes 147/106 ... yes 161/107 ... yes 161/108 ... yes 161/109 ... yes 161/110 ... yes 161/111 ... yes 18/112 ... yes 171/113 ... yes 171/114 ... yes 171/115 ... yes 171/116 ... yes 171/117 ... yes 171/118 ... yes 171/119 ... yes 171/120 ... yes 181/121 ... yes 181/122 ... yes 181/123 ... yes 181/124 ... yes 181/125 ... yes 181/126 ... yes 181/127 ... yes 183/128 ... yes 183/129 ... yes 189/131 ... yes 5/132 ... yes 18/133 ... yes 181/134 ... yes 88/135 ... yes 1/136 ... yes 192/137 ... yes 1/138 ... yes 1/139 ... yes 195/140 ... yes 1/142 ... yes 112/143 ... yes 68/144 ... yes 60/145 ... yes 58/146 ... yes 1/147 ... yes 200/148 ... yes 1/149 ... yes 1/150 ... yes 1/151 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git version >= 2.33.0 ? ... yes (2.33.1) Git user has default SSH configuration? ... yes Active users: ... 112 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 (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished