You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
7
7
## Unreleased
8
8
9
+
### Added
10
+
- Support the [DefaultAWSCredentialsProviderChain](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html)
11
+
for passing in credentials to the S3ByteStorageService.
12
+
9
13
### Fixed
10
14
- Upgraded extractor parameters jsonform to version `2.2.5`.
15
+
- Cleaning up after a failed upload should no longer decrement the file + byte counts.
11
16
- Fix the broken link after file deletion within a folder. [#277](https://github.com/clowder-framework/clowder/issues/277)
12
17
13
18
### Changed
14
19
- now building mongo-init and monitor docker containers with python 3.8
20
+
- Upgraded extractor parameters jsonform to version `2.2.5`.
15
21
16
22
### Removed
17
23
- check image is now part of [ncsa/checks](https://github.com/ncsa/checks/)
/* Reusable handlers for various Exception types */
49
+
defhandleUnknownError(err: Exception=null) = {
50
+
if (err !=null) {
51
+
Logger.error("An unknown error occurred in the S3ByteStorageService: "+ err.toString)
52
+
} else {
53
+
Logger.error("An unknown error occurred in the S3ByteStorageService.")
54
+
}
55
+
}
56
+
57
+
/* Reusable handlers for various Exception types */
58
+
defhandleIOE(err: IOException) = {
59
+
Logger.error("IOException occurred in the S3ByteStorageService: "+ err)
60
+
}
61
+
62
+
/* Reusable handlers for various Exception types */
63
+
defhandleACE(ace: AmazonClientException) = {
64
+
Logger.error("Caught an AmazonClientException, which "+"means the client encountered "+"an internal error while trying to "+"communicate with S3, "+"such as not being able to access the network.")
65
+
Logger.error("Error Message: "+ ace.getMessage)
66
+
}
67
+
68
+
/* Reusable handlers for various Exception types */
69
+
defhandleASE(ase: AmazonServiceException) = {
70
+
Logger.error("Caught an AmazonServiceException, which "+"means your request made it "+"to Amazon S3, but was rejected with an error response"+" for some reason.")
71
+
Logger.error("Error Message: "+ ase.getMessage)
72
+
Logger.error("HTTP Status Code: "+ ase.getStatusCode)
vals3client= (Play.current.configuration.getString(S3ByteStorageService.ServiceEndpoint), Play.current.configuration.getString(S3ByteStorageService.Region)) match {
92
+
case (Some(serviceEndpoint), Some(region)) => {
93
+
Logger.debug("Creating S3 Client with custom endpoint and region: "+ serviceEndpoint +" in region "+ region)
@@ -231,7 +291,7 @@ class S3ByteStorageService @Inject()() extends ByteStorageService {
231
291
try {
232
292
// Delete object from S3 bucket
233
293
// NOTE: path should already contain the prefix
234
-
this.s3Bucket.deleteObject(bucketName, path)
294
+
s3.deleteObject(bucketName, path)
235
295
returntrue
236
296
} catch {
237
297
casease: AmazonServiceException=> handleASE(ase)
@@ -245,31 +305,4 @@ class S3ByteStorageService @Inject()() extends ByteStorageService {
245
305
// Return false (in case of failure)
246
306
returnfalse
247
307
}
248
-
249
-
/* Reusable handlers for various Exception types */
250
-
defhandleUnknownError(err: Exception=null) = {
251
-
if (err !=null) {
252
-
Logger.error("An unknown error occurred in the S3ByteStorageService: "+ err.toString)
253
-
} else {
254
-
Logger.error("An unknown error occurred in the S3ByteStorageService.")
255
-
}
256
-
}
257
-
258
-
defhandleIOE(err: IOException) = {
259
-
Logger.error("IOException occurred in the S3ByteStorageService: "+ err)
260
-
}
261
-
262
-
defhandleACE(ace: AmazonClientException) = {
263
-
Logger.error("Caught an AmazonClientException, which "+"means the client encountered "+"an internal error while trying to "+"communicate with S3, "+"such as not being able to access the network.")
264
-
Logger.error("Error Message: "+ ace.getMessage)
265
-
}
266
-
267
-
defhandleASE(ase: AmazonServiceException) = {
268
-
Logger.error("Caught an AmazonServiceException, which "+"means your request made it "+"to Amazon S3, but was rejected with an error response"+" for some reason.")
269
-
Logger.error("Error Message: "+ ase.getMessage)
270
-
Logger.error("HTTP Status Code: "+ ase.getStatusCode)
0 commit comments