Commit eb2a2f7
authored
direct: when deleting resources, treat 403 as 404 (#3931)
## Changes
During "bundle destroy" or "bundle deploy" with resource deleted, 403
errors will result in warning rather than hard error.
This does not affect recreate, which still results in hard error.
## Why
If users don't have permissions to a resource for whatever reason, they
need to unbind it in order to make their bundle usable or destroyable.
This automatically unbinds.
We also saw that jobs service maintains permissions for deleted jobs, so
even if job does not exist, deleting it still results in 403 error.
Aborting "bundle destroy" in this case does not seem helpful.
## Tests
Existing integration test added in
#39221 parent 59c609e commit eb2a2f7
File tree
11 files changed
+21
-86
lines changed- acceptance/bundle/resources/permissions/jobs/destroy_without_mgmtperms
- with_permissions
- without_permissions
- bundle/direct
11 files changed
+21
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
| 22 | + | |
0 commit comments