Commit e9f48ff
committed
fix(s3): Skip empty files when downloading dbt projects from S3
Me and other users have noticed that when uploading files to S3 using
the AWS web UI an unnamed file may sometimes appear.
Not entirely sure if this is a bug on AWS' side or what, but it's
causing us issues when downloading dbt projects from S3 as we attemp
to create a file with the name of the parent directory (which usually
already exists, or is created and later downloads fail when they are
nested inside that file/directory).
So this deals with the issue by ignoring files like this. Also added a
unit test to cover this case, although it's kind of hard to test the
behaviour as this file apparently only appears when using the web UI.1 parent 33c4803 commit e9f48ff
File tree
2 files changed
+69
-7
lines changed- airflow_dbt_python/hooks
- tests/hooks/s3
2 files changed
+69
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
176 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | | - | |
| 186 | + | |
180 | 187 | | |
181 | 188 | | |
| 189 | + | |
182 | 190 | | |
| 191 | + | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| |||
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| 202 | + | |
193 | 203 | | |
194 | 204 | | |
195 | 205 | | |
196 | 206 | | |
197 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
198 | 210 | | |
199 | 211 | | |
200 | 212 | | |
| |||
230 | 242 | | |
231 | 243 | | |
232 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
0 commit comments