Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TH2-4953] - th2 transport protocol #7

Merged
merged 10 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/dev-release-java-publish-sonatype-and-docker.yml
OptimumCode marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and release Java distributions to sonatype.

on:
push:
tags:
- \d+.\d+.\d+-dev

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Sonatype,Docker'
runsOn: ubuntu-latest
gradleVersion: '7'
docker-username: ${{ github.actor }}
devRelease: true
secrets:
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
docker-password: ${{ secrets.GITHUB_TOKEN }}
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# th2-read-db
# th2-read-db 0.1.0

The read-db is a component for extracting data from databases using JDBC technology. If database has JDBC driver the read can work with the database

# Configuration
Expand Down Expand Up @@ -150,6 +151,7 @@ spec:
queueSize: 1000
maxDelayMillis: 1000
maxBatchSize: 100
useTransport: true
pins:
- name: server
connection-type: grpc-server
Expand All @@ -158,7 +160,7 @@ spec:
- th2.read_db.ReadDbService
- name: store
connection-type: mq
attributes: ['raw', 'publish', 'store']
attributes: ['transport-group', 'publish', 'store']
extended-settings:
service:
enabled: false
Expand All @@ -171,4 +173,10 @@ spec:
requests:
memory: 100Mi
cpu: 50m
```
```

## Changes

### 0.1.0

+ Added support for th2 transport protocol
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
runtimeOnly('org.postgresql:postgresql:42.5.3') {
because('prostresql support')
}
runtimeOnly('com.mysql:mysql-connector-j:8.0.32') {
runtimeOnly('com.mysql:mysql-connector-j:8.1.0') {
because('mysql support')
}
runtimeOnly('com.oracle.database.jdbc:ojdbc11:21.9.0.0') {
Expand Down
2 changes: 1 addition & 1 deletion app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kotlin.code.style=official
release_version=0.1.0
release_version=0.2.0
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'org.jetbrains.kotlin.jvm' version '1.6.21' apply false
id "org.owasp.dependencycheck" version "8.1.2"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id 'org.jetbrains.kotlin.jvm' version '1.8.22' apply false
id "org.owasp.dependencycheck" version "8.3.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add plugins for licenses and git properties

}

allprojects {
Expand Down
39 changes: 22 additions & 17 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'org.jetbrains.kotlin.jvm'
id "org.jetbrains.kotlin.jvm"
}

apply from: '../common.gradle'
Expand All @@ -12,7 +14,7 @@ ext {
coroutines_version = '1.6.4'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update the coroutines version because we have updated the kotlin version

}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
Expand All @@ -25,33 +27,36 @@ configurations.configureEach {
}

dependencies {
implementation project(':grpc-read-db')
implementation project(":grpc-read-db")

implementation 'com.exactpro.th2:common:5.2.0-dev'
implementation 'org.slf4j:slf4j-api'
api platform("com.exactpro.th2:bom:4.5.0")
implementation "com.exactpro.th2:common:5.4.0-dev"
implementation "com.exactpro.th2:common-utils:2.2.0-dev"
implementation "org.slf4j:slf4j-api"

implementation('org.apache.commons:commons-dbcp2:2.9.0') {
because('connection pool')
implementation("org.apache.commons:commons-dbcp2:2.9.0") {
because("connection pool")
}
implementation 'org.apache.commons:commons-text:1.9'
implementation('com.opencsv:opencsv:5.6') {
because('publishes raw messages in csv format')
implementation "org.apache.commons:commons-text"
implementation("com.opencsv:opencsv:5.8") {
because("publishes raw messages in csv format")
}

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation 'io.github.microutils:kotlin-logging:3.0.0'
implementation "io.github.microutils:kotlin-logging:3.0.5"
implementation "com.fasterxml.jackson.core:jackson-databind"

testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
testImplementation "org.junit.jupiter:junit-jupiter:5.10.0"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "io.strikt:strikt-core:0.34.1"
OptimumCode marked this conversation as resolved.
Show resolved Hide resolved

testImplementation platform('org.testcontainers:testcontainers-bom:1.17.3')
testImplementation 'org.testcontainers:testcontainers'
testImplementation 'org.testcontainers:mysql'
testImplementation platform("org.testcontainers:testcontainers-bom:1.19.0")
testImplementation "org.testcontainers:testcontainers"
testImplementation "org.testcontainers:mysql"
OptimumCode marked this conversation as resolved.
Show resolved Hide resolved

testRuntimeOnly('mysql:mysql-connector-java:8.0.30') {
because('mysql support')
testRuntimeOnly("com.mysql:mysql-connector-j:8.1.0") {
because("mysql support")
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kotlin.code.style=official
release_version=0.0.1
release_version=0.1.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Exactpro (Exactpro Systems Limited)
* Copyright 2022-2023 Exactpro (Exactpro Systems Limited)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,8 @@ class DataBaseReaderConfiguration(
val dataSources: Map<DataSourceId, DataSourceConfiguration>,
val queries: Map<QueryId, QueryConfiguration>,
val startupTasks: List<StartupTaskConfiguration> = emptyList(),
val publication: PublicationConfiguration = PublicationConfiguration()
val publication: PublicationConfiguration = PublicationConfiguration(),
val useTransport: Boolean = false
)

class PublicationConfiguration(
Expand Down
Loading
Loading