Commit 40db62a
authored
Fix S3 deletion for buckets/endpoints other than what’s configured for upload (#9047)
We can have multiple managed s3 stores. Only one is selected for upload
but dataset deletion should work for all of them. This PR refactors the
ManagedS3Service a bit and selects the correct client with
endpoint/credential for each path.
### URL of deployed dev instance (used for testing):
- https://___.webknossos.xyz
### Steps to test:
(I already tested locally, no need to re-test)
- In application.conf, insert multiple dataVaults.credentials for s3
endpoints. Set s3Upload.credentialName to the first of them
- Upload a small dataset
- set the s3Upload.credentialName to another of them
- make sure both datasets can be loaded
- delete both datasets from their respective settings views.
- backend logging should show they were deleted from their respective s3
buckets
### Issues:
- follow-up for #8924
- fixes #9043
------
- [x] Added changelog entry (create a `$PR_NUMBER.md` file in
`unreleased_changes` or use `./tools/create-changelog-entry.py`)
- [x] Removed dev-only changes like prints and application.conf edits
- [x] Considered [common edge
cases](../blob/master/.github/common_edge_cases.md)
- [x] Needs datastore update after deployment1 parent bb89fb8 commit 40db62a
File tree
7 files changed
+77
-76
lines changed- unreleased_changes
- webknossos-datastore/app/com/scalableminds/webknossos/datastore
- datavault
- services
- uploading
- storage
7 files changed
+77
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
| 194 | + | |
202 | 195 | | |
203 | 196 | | |
204 | 197 | | |
| |||
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
Lines changed: 56 additions & 38 deletions
| 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 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | | - | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
29 | 45 | | |
30 | | - | |
31 | | - | |
| 46 | + | |
| 47 | + | |
32 | 48 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
37 | 58 | | |
38 | 59 | | |
39 | 60 | | |
40 | 61 | | |
41 | | - | |
| 62 | + | |
42 | 63 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
| |||
54 | 78 | | |
55 | 79 | | |
56 | 80 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
61 | 88 | | |
62 | 89 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 90 | + | |
66 | 91 | | |
67 | 92 | | |
68 | | - | |
| 93 | + | |
69 | 94 | | |
70 | 95 | | |
71 | 96 | | |
72 | 97 | | |
73 | | - | |
74 | 98 | | |
75 | | - | |
76 | | - | |
| 99 | + | |
| 100 | + | |
77 | 101 | | |
78 | 102 | | |
79 | 103 | | |
| |||
89 | 113 | | |
90 | 114 | | |
91 | 115 | | |
92 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
93 | 120 | | |
94 | 121 | | |
95 | 122 | | |
96 | 123 | | |
| 124 | + | |
97 | 125 | | |
98 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
99 | 129 | | |
100 | 130 | | |
101 | 131 | | |
| |||
142 | 172 | | |
143 | 173 | | |
144 | 174 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 175 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
| 540 | + | |
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| |||
webknossos-datastore/app/com/scalableminds/webknossos/datastore/storage/DataVaultCredentials.scala
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
Lines changed: 7 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 113 | | |
124 | 114 | | |
125 | 115 | | |
126 | 116 | | |
127 | 117 | | |
128 | 118 | | |
129 | 119 | | |
130 | | - | |
| 120 | + | |
131 | 121 | | |
132 | 122 | | |
133 | 123 | | |
| |||
136 | 126 | | |
137 | 127 | | |
138 | 128 | | |
139 | | - | |
| 129 | + | |
140 | 130 | | |
141 | 131 | | |
142 | 132 | | |
143 | 133 | | |
144 | 134 | | |
145 | 135 | | |
146 | | - | |
| 136 | + | |
147 | 137 | | |
148 | 138 | | |
149 | 139 | | |
| |||
152 | 142 | | |
153 | 143 | | |
154 | 144 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 145 | | |
159 | 146 | | |
160 | 147 | | |
| |||
0 commit comments