From 8903f5b836d7e2dee835d474569fe1603a6e3809 Mon Sep 17 00:00:00 2001 From: Anton Kurako Date: Thu, 28 Aug 2025 13:09:37 +0300 Subject: [PATCH 1/3] 1.2.1 --- kora-java-s3-client-aws/build.gradle | 6 ++++-- kora-java-s3-client-aws/docker-compose.yml | 15 +++++++++++++++ kora-java-s3-client-aws/gradle.properties | 5 +++++ kora-java-s3-client-minio/build.gradle | 5 ++++- kora-java-s3-client-minio/docker-compose.yml | 15 +++++++++++++++ kora-java-s3-client-minio/gradle.properties | 5 +++++ 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 kora-java-s3-client-aws/docker-compose.yml create mode 100644 kora-java-s3-client-aws/gradle.properties create mode 100644 kora-java-s3-client-minio/docker-compose.yml create mode 100644 kora-java-s3-client-minio/gradle.properties diff --git a/kora-java-s3-client-aws/build.gradle b/kora-java-s3-client-aws/build.gradle index b7df2523..77154d30 100644 --- a/kora-java-s3-client-aws/build.gradle +++ b/kora-java-s3-client-aws/build.gradle @@ -25,7 +25,6 @@ dependencies { implementation "ru.tinkoff.kora.experimental:s3-client-aws" implementation "ru.tinkoff.kora:http-client-async" implementation "ru.tinkoff.kora:http-client-jdk" - implementation "ru.tinkoff.kora:http-client-ok" implementation "ru.tinkoff.kora:logging-logback" implementation "ru.tinkoff.kora:config-hocon" @@ -43,7 +42,10 @@ application { //noinspection GroovyAssignabilityCheck run { environment([ - "": "" + "S3_URL" : "$s3Url", + "S3_BUCKET" : "$s3Bucket", + "S3_ACCESS_KEY": "$s3AccessKey", + "S3_SECRET_KEY": "$s3SecretKey", ]) } diff --git a/kora-java-s3-client-aws/docker-compose.yml b/kora-java-s3-client-aws/docker-compose.yml new file mode 100644 index 00000000..b4a4fb74 --- /dev/null +++ b/kora-java-s3-client-aws/docker-compose.yml @@ -0,0 +1,15 @@ +services: + minio: + image: docker-proxy.artifactory.tcsbank.ru/minio/minio:RELEASE.2025-04-22T22-12-26Z + restart: unless-stopped + ports: + - '9000:9000' + environment: + MINIO_ACCESS_KEY: minio + MINIO_SECRET_KEY: minio123 + command: server /data/minio + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live'] + interval: 30s + timeout: 20s + retries: 3 diff --git a/kora-java-s3-client-aws/gradle.properties b/kora-java-s3-client-aws/gradle.properties new file mode 100644 index 00000000..070f2fbd --- /dev/null +++ b/kora-java-s3-client-aws/gradle.properties @@ -0,0 +1,5 @@ +##### S3 ##### +s3Url=http://localhost:9000 +s3Bucket=minio +s3AccessKey=minio +s3SecretKey=minio123 diff --git a/kora-java-s3-client-minio/build.gradle b/kora-java-s3-client-minio/build.gradle index b37592ae..7a4349bf 100644 --- a/kora-java-s3-client-minio/build.gradle +++ b/kora-java-s3-client-minio/build.gradle @@ -42,7 +42,10 @@ application { //noinspection GroovyAssignabilityCheck run { environment([ - "": "" + "S3_URL" : "$s3Url", + "S3_BUCKET" : "$s3Bucket", + "S3_ACCESS_KEY": "$s3AccessKey", + "S3_SECRET_KEY": "$s3SecretKey", ]) } diff --git a/kora-java-s3-client-minio/docker-compose.yml b/kora-java-s3-client-minio/docker-compose.yml new file mode 100644 index 00000000..b4a4fb74 --- /dev/null +++ b/kora-java-s3-client-minio/docker-compose.yml @@ -0,0 +1,15 @@ +services: + minio: + image: docker-proxy.artifactory.tcsbank.ru/minio/minio:RELEASE.2025-04-22T22-12-26Z + restart: unless-stopped + ports: + - '9000:9000' + environment: + MINIO_ACCESS_KEY: minio + MINIO_SECRET_KEY: minio123 + command: server /data/minio + healthcheck: + test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live'] + interval: 30s + timeout: 20s + retries: 3 diff --git a/kora-java-s3-client-minio/gradle.properties b/kora-java-s3-client-minio/gradle.properties new file mode 100644 index 00000000..070f2fbd --- /dev/null +++ b/kora-java-s3-client-minio/gradle.properties @@ -0,0 +1,5 @@ +##### S3 ##### +s3Url=http://localhost:9000 +s3Bucket=minio +s3AccessKey=minio +s3SecretKey=minio123 From f14a2928fc7a76cd708946dda9399408fed5312a Mon Sep 17 00:00:00 2001 From: Anton Kurako Date: Mon, 8 Sep 2025 15:08:58 +0300 Subject: [PATCH 2/3] 1.2.2 Updated badge Fixed TelemetryTests --- README.md | 10 +++++++--- gradle.properties | 2 +- .../kora/example/telemetry/TelemetryTests.java | 16 ++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 23b18bf2..c599ee52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Maven Central](https://maven-badges.sml.io/sonatype-central/ru.tinkoff.kora/common/badge.svg)](https://maven-badges.sml.io/sonatype-central/ru.tinkoff.kora/common) +[![Maven Central](https://img.shields.io/maven-central/v/ru.tinkoff.kora/common.svg)](https://central.sonatype.com/artifact/ru.tinkoff.kora/common) [![GitHub Action](https://github.com/kora-projects/kora-examples/workflows/Build%20Master/badge.svg)](https://github.com/kora-projects/kora-examples/actions?query=workflow%3A%22Build%20Master%22++) # Kora examples @@ -10,11 +10,15 @@ использовать примеры как пособие по начальному погружению в Kora. [Хотите знать больше?](https://kora-projects.github.io/kora-docs/ru/) +[Описание](https://kora-projects.github.io/kora-docs/ru/) | [Документация](https://kora-projects.github.io/kora-docs/ru/documentation/general/) | [Ознакомление](https://kora-projects.github.io/kora-docs/ru/examples/hello-world/) + --- -This repository contains examples of applications using various [Kora framework](https://kora-projects.github.io/kora-docs/en/) fmodules. +This repository contains examples of applications using various [Kora framework](https://kora-projects.github.io/kora-docs/en/) modules. Each Gradle module is an independent application. Here you can look at implementations of Kora framework modules in Java and Kotlin languages, test their functionality, use the examples as a guide for initial immersion in Kora. -[Would you like to know more?](https://kora-projects.github.io/kora-docs/en/) \ No newline at end of file +[Would you like to know more?](https://kora-projects.github.io/kora-docs/en/) + +[Home](https://kora-projects.github.io/kora-docs/en/) | [Documentation](https://kora-projects.github.io/kora-docs/en/documentation/general/) | [Hello World](https://kora-projects.github.io/kora-docs/en/examples/hello-world/) diff --git a/gradle.properties b/gradle.properties index 4c0da324..00569639 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ groupId=ru.tinkoff.kora -koraVersion=1.2.0 +koraVersion=1.2.0-SNAPSHOT ##### GRADLE ##### diff --git a/kora-java-telemetry/src/test/java/ru/tinkoff/kora/example/telemetry/TelemetryTests.java b/kora-java-telemetry/src/test/java/ru/tinkoff/kora/example/telemetry/TelemetryTests.java index ce2c198a..5492c67c 100644 --- a/kora-java-telemetry/src/test/java/ru/tinkoff/kora/example/telemetry/TelemetryTests.java +++ b/kora-java-telemetry/src/test/java/ru/tinkoff/kora/example/telemetry/TelemetryTests.java @@ -32,24 +32,23 @@ class TelemetryTests { void tracingTelemetryExported() throws Exception { // given var httpClient = HttpClient.newHttpClient(); - - // when var requestTest = HttpRequest.newBuilder() .GET() .uri(container.getURI().resolve("/text")) .timeout(Duration.ofSeconds(5)) .build(); + // when var responseTest = httpClient.send(requestTest, HttpResponse.BodyHandlers.ofString()); assertEquals(200, responseTest.statusCode()); // then Awaitility.await().atMost(Duration.ofSeconds(5)) - .untilAsserted(() -> { + .until(() -> { final String logs = telemetryContainer.getLogs(OutputFrame.OutputType.STDERR); final String[] logsSplit = logs.split("\n"); final String lastLog = logsSplit[logsSplit.length - 1].replace('\t', ' '); - lastLog.endsWith( + return lastLog.endsWith( "TracesExporter {\"kind\": \"exporter\", \"data_type\": \"traces\", \"name\": \"logging\", \"#spans\": 1}"); }); } @@ -58,14 +57,13 @@ void tracingTelemetryExported() throws Exception { void healthLivenessFails() throws Exception { // given var httpClient = HttpClient.newHttpClient(); - - // then var request = HttpRequest.newBuilder() .GET() .uri(container.getSystemURI().resolve("/liveness")) .timeout(Duration.ofSeconds(5)) .build(); + // then var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); assertEquals(503, response.statusCode()); assertEquals("Error", response.body()); @@ -75,14 +73,13 @@ void healthLivenessFails() throws Exception { void healthReadinessFails() throws Exception { // given var httpClient = HttpClient.newHttpClient(); - - // then var request = HttpRequest.newBuilder() .GET() .uri(container.getSystemURI().resolve("/readiness")) .timeout(Duration.ofSeconds(5)) .build(); + // then var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); assertEquals(503, response.statusCode()); assertEquals("Error", response.body()); @@ -92,14 +89,13 @@ void healthReadinessFails() throws Exception { void metricsSuccess() throws Exception { // given var httpClient = HttpClient.newHttpClient(); - - // then var request = HttpRequest.newBuilder() .GET() .uri(container.getSystemURI().resolve("/metrics")) .timeout(Duration.ofSeconds(5)) .build(); + // then var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); assertEquals(200, response.statusCode()); assertFalse(response.body().isBlank()); From 421cc481e4855af87318243ef31750858572129e Mon Sep 17 00:00:00 2001 From: Anton Kurako Date: Mon, 8 Sep 2025 17:38:55 +0300 Subject: [PATCH 3/3] 1.2.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 00569639..53897c7f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ groupId=ru.tinkoff.kora -koraVersion=1.2.0-SNAPSHOT +koraVersion=1.2.2 ##### GRADLE #####