- Comment-out the bucket-deletion process, in order to avoid any accidental deletion, even if it has to be explicitly allowed in the config.

- Update dependencies.
This commit is contained in:
Lampros Smyrnaios 2024-04-26 12:54:00 +03:00
parent e2d43a9af0
commit 64a1b7d4f0
3 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ dependencies {
//implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: '3.0.2'
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation group: 'com.google.guava', name: 'guava', version: '33.0.0-jre'
implementation group: 'com.google.guava', name: 'guava', version: '33.1.0-jre'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
@ -52,7 +52,7 @@ dependencies {
implementation("org.apache.commons:commons-compress:1.26.1") {
exclude group: 'com.github.luben', module: 'zstd-jni'
}
implementation 'com.github.luben:zstd-jni:1.5.5-11' // Even though this is part of the above dependency, the Apache commons rarely updates it, while the zstd team makes improvements very often.
implementation 'com.github.luben:zstd-jni:1.5.6-3' // Even though this is part of the above dependency, the Apache commons rarely updates it, while the zstd team makes improvements very often.
implementation 'io.minio:minio:8.5.9'
@ -119,7 +119,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus
runtimeOnly 'io.micrometer:micrometer-registry-prometheus:1.12.4'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus:1.12.5'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation "org.springframework.boot:spring-boot-starter-test"

View File

@ -48,8 +48,8 @@ public class S3ObjectStore {
boolean bucketExists = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
// Keep this commented-out to avoid objects-deletion by accident. The code is open-sourced, so it's easy to enable this ability if we really want it (e.g. for testing).
if ( shouldEmptyBucket && isTestEnvironment && bucketExists )
emptyBucket(bucketName, false);
/*if ( shouldEmptyBucket && isTestEnvironment && bucketExists )
emptyBucket(bucketName, false);*/
// Make the bucket, if not exist.
if ( !bucketExists ) {

View File

@ -32,7 +32,7 @@ services:
secretKey: XA
region: XA
bucketName: XA
shouldEmptyBucket: false
shouldEmptyBucket: false # For data-security, in order to use this ability, the relevant code has to be uncommented in "util.S3ObjectStore.java"
shouldShowAllS3Buckets: true
worker:
port: 1881