update deps, use damsel.msgpack.Value (#3)

* fix linter
This commit is contained in:
Anatoly Karlov 2022-05-06 19:51:04 +07:00 committed by GitHub
parent 7fce7c6a57
commit ccdaffe109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 46 additions and 36 deletions

View File

@ -11,7 +11,7 @@ x-minio-common: &minio-common
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3

View File

@ -12,7 +12,7 @@ services:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3

22
pom.xml
View File

@ -30,7 +30,11 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>file-storage-proto</artifactId>
<version>1.33-86bcf44</version>
<version>1.41-89c2d94</version>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
<artifactId>damsel</artifactId>
</dependency>
<dependency>
<groupId>dev.vality.woody</groupId>
@ -144,22 +148,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>p12</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>

View File

@ -1,10 +1,10 @@
package dev.vality.file.storage.handler;
import dev.vality.damsel.msgpack.Value;
import dev.vality.file.storage.FileData;
import dev.vality.file.storage.FileNotFound;
import dev.vality.file.storage.FileStorageSrv;
import dev.vality.file.storage.NewFileResult;
import dev.vality.file.storage.msgpack.Value;
import dev.vality.file.storage.service.StorageService;
import dev.vality.file.storage.service.exception.FileNotFoundException;
import dev.vality.file.storage.service.exception.StorageException;

View File

@ -6,10 +6,10 @@ import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.*;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.Upload;
import dev.vality.damsel.msgpack.Value;
import dev.vality.file.storage.FileData;
import dev.vality.file.storage.NewFileResult;
import dev.vality.file.storage.configuration.properties.S3Properties;
import dev.vality.file.storage.msgpack.Value;
import dev.vality.file.storage.service.exception.ExtractMetadataException;
import dev.vality.file.storage.service.exception.FileNotFoundException;
import dev.vality.file.storage.service.exception.StorageException;

View File

@ -1,9 +1,9 @@
package dev.vality.file.storage.service;
import dev.vality.damsel.msgpack.Value;
import dev.vality.file.storage.FileData;
import dev.vality.file.storage.NewFileResult;
import dev.vality.file.storage.configuration.properties.S3SdkV2Properties;
import dev.vality.file.storage.msgpack.Value;
import dev.vality.file.storage.service.exception.FileNotFoundException;
import dev.vality.file.storage.service.exception.StorageException;
import dev.vality.file.storage.util.DamselUtil;

View File

@ -1,8 +1,8 @@
package dev.vality.file.storage.service;
import dev.vality.damsel.msgpack.Value;
import dev.vality.file.storage.FileData;
import dev.vality.file.storage.NewFileResult;
import dev.vality.file.storage.msgpack.Value;
import java.net.URL;
import java.time.Instant;

View File

@ -30,7 +30,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static dev.vality.file.storage.msgpack.Value.*;
import static dev.vality.damsel.msgpack.Value.*;
import static dev.vality.testcontainers.annotations.util.ValuesGenerator.*;
import static org.junit.jupiter.api.Assertions.*;
@ -59,9 +59,9 @@ public abstract class FileStorageTest {
@Test
public void fileUploadWithHttpClientBuilderTest() throws IOException, URISyntaxException, TException {
String expirationTime = generateCurrentTimePlusDay().toString();
Map<String, dev.vality.file.storage.msgpack.Value> metadata = new HashMap<>();
metadata.put("author", dev.vality.file.storage.msgpack.Value.str("Mary Doe"));
metadata.put("version", dev.vality.file.storage.msgpack.Value.str("1.0.0.0"));
Map<String, dev.vality.damsel.msgpack.Value> metadata = new HashMap<>();
metadata.put("author", dev.vality.damsel.msgpack.Value.str("Mary Doe"));
metadata.put("version", dev.vality.damsel.msgpack.Value.str("1.0.0.0"));
NewFileResult fileResult = fileStorageClient.createNewFile(metadata, expirationTime);
@ -94,9 +94,9 @@ public abstract class FileStorageTest {
try {
// создание нового файла
String expirationTime = generateCurrentTimePlusDay().toString();
Map<String, dev.vality.file.storage.msgpack.Value> metadata = new HashMap<>();
metadata.put("author", dev.vality.file.storage.msgpack.Value.str("Mary Doe"));
metadata.put("version", dev.vality.file.storage.msgpack.Value.str("1.0.0.0"));
Map<String, dev.vality.damsel.msgpack.Value> metadata = new HashMap<>();
metadata.put("author", dev.vality.damsel.msgpack.Value.str("Mary Doe"));
metadata.put("version", dev.vality.damsel.msgpack.Value.str("1.0.0.0"));
NewFileResult fileResult = fileStorageClient.createNewFile(metadata, expirationTime);
uploadTestData(fileResult, FILE_NAME, FILE_DATA);

View File

@ -6,5 +6,5 @@ import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
@CephTestcontainerSingleton(
properties = {"s3-sdk-v2.enabled=true", "s3-sdk-v2.region=us-east-1"},
bucketName = "awssdks3v2")
public class WithCeph extends FileStorageTest {
public class WithCephTest extends FileStorageTest {
}

View File

@ -6,5 +6,5 @@ import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
@MinioTestcontainerSingleton(
properties = "s3-sdk-v2.enabled=true",
bucketName = "awssdks3v2")
public class WithMinio extends FileStorageTest {
public class WithMinioTest extends FileStorageTest {
}

View File

@ -4,5 +4,5 @@ import dev.vality.file.storage.FileStorageTest;
import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
@CephTestcontainerSingleton(bucketName = "s3signer")
public class WithCeph extends FileStorageTest {
public class WithCephTest extends FileStorageTest {
}

View File

@ -4,5 +4,5 @@ import dev.vality.file.storage.FileStorageTest;
import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
@MinioTestcontainerSingleton(bucketName = "s3signer")
public class WithMinio extends FileStorageTest {
public class WithMinioTest extends FileStorageTest {
}

View File

@ -6,5 +6,5 @@ import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
@CephTestcontainerSingleton(
properties = "s3.signer-override=AWSS3V4SignerType",
bucketName = "s3v4signer")
public class WithCeph extends FileStorageTest {
public class WithCephTest extends FileStorageTest {
}

View File

@ -6,5 +6,5 @@ import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
@MinioTestcontainerSingleton(
properties = "s3.signer-override=AWSS3V4SignerType",
bucketName = "s3v4signer")
public class WithMinio extends FileStorageTest {
public class WithMinioTest extends FileStorageTest {
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="info">
<appender-ref ref="CONSOLE"/>
</root>
<logger name="org.apache.http">
<level value="error"/>
</logger>
<logger name="com.amazonaws">
<level value="error"/>
</logger>
<logger name="dev.vality.woody">
<level value="error"/>
</logger>
</configuration>