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-5254] Migrate to processor-core:0.3.0-dev and cradle:5.4.4-dev #8

Merged
merged 18 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5437e43
[th2-4262] Migrated to processor-core and book&page
Nikita-Smirnov-Exactpro Dec 1, 2022
4f16012
[th2-4262] added `heal parent event twice` test
Nikita-Smirnov-Exactpro Dec 1, 2022
2d1b8d3
[th2-4262] added logic to update unsubmitted interval
Nikita-Smirnov-Exactpro Dec 1, 2022
bff0176
[th2-4262] added retry success for unsubmitted event
Nikita-Smirnov-Exactpro Dec 1, 2022
7aaead6
[th2-4262] Implemented state
Nikita-Smirnov-Exactpro Dec 3, 2022
fdc58a7
[th2-4262] Extracted Event.log extension into core project
Nikita-Smirnov-Exactpro Dec 4, 2022
af89b2b
[ TH2-4504] Reuse scheduler from ProcessorContext
Nikita-Smirnov-Exactpro Dec 6, 2022
76bed18
[TH2-4504] Corrected GitHub actions
Nikita-Smirnov-Exactpro Dec 6, 2022
e744e40
[TH2-4504] Updated processor-core
Nikita-Smirnov-Exactpro Dec 20, 2022
876e5c8
[TH2-4504] Updated processor-core
Nikita-Smirnov-Exactpro Dec 20, 2022
2b433a2
[TH2-4504] Updated README.md
Nikita-Smirnov-Exactpro Dec 20, 2022
cfca810
[TH2-5254] Updated gradle to 8.11
Nikita-Smirnov-Exactpro Nov 13, 2024
d64f390
[TH2-5254] Updated dependencies
Nikita-Smirnov-Exactpro Nov 13, 2024
772b8a7
[TH2-5254] Updated workflows
Nikita-Smirnov-Exactpro Nov 13, 2024
8a9a966
[TH2-5254] Updated auto-service:1.1.1
Nikita-Smirnov-Exactpro Nov 13, 2024
64a305c
[TH2-5254] Updated readme
Nikita-Smirnov-Exactpro Nov 14, 2024
ba468e9
[TH2-5254] Updated readme
Nikita-Smirnov-Exactpro Nov 14, 2024
3177ada
Merge remote-tracking branch 'origin/book-and-page' into TH2-5254
Nikita-Smirnov-Exactpro Nov 15, 2024
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
15 changes: 15 additions & 0 deletions .github/workflows/build-dev-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build and publish dev release Docker image to Github Container Registry ghcr.io

on: workflow_dispatch

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Docker'
devRelease: true
createTag: true
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
nvd-api-key: ${{ secrets.NVD_APIKEY }}
15 changes: 15 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build and publish release Docker image to Github Container Registry ghcr.io

on: workflow_dispatch

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Docker'
devRelease: false
createTag: true
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
nvd-api-key: ${{ secrets.NVD_APIKEY }}
20 changes: 20 additions & 0 deletions .github/workflows/build-sanpshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build and publish Docker image to Github Container Registry ghcr.io

on:
push:
branches-ignore:
- master
- version-*
- dependabot**
paths-ignore:
- README.md

jobs:
build-job:
uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
with:
build-target: 'Docker'
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
nvd-api-key: ${{ secrets.NVD_APIKEY }}
28 changes: 14 additions & 14 deletions .github/workflows/ci-unwelcome-words.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.sha }}
- name: Checkout tool
uses: actions/checkout@v2
with:
repository: exactpro-th2/ci-github-action
ref: master
token: ${{ secrets.PAT_CI_ACTION }}
path: ci-github-action
- name: Run CI action
uses: ./ci-github-action
with:
ref: ${{ github.sha }}
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Checkout tool
uses: actions/checkout@v4
with:
repository: exactpro-th2/ci-github-action
ref: master
token: ${{ secrets.PAT_CI_ACTION }}
path: ci-github-action
- name: Run CI action
uses: ./ci-github-action
with:
ref: ${{ github.sha }}
47 changes: 0 additions & 47 deletions .github/workflows/dev-docker-publish.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/docker-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM gradle:6.8-jdk11 AS build
FROM gradle:8.11-jdk11 AS build
ARG release_version
ARG nexus_url
ARG nexus_user
ARG nexus_password

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-job / Build Docker image and push to ghcr.io / docker-push

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "nexus_password") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

COPY ./ .
RUN gradle --no-daemon clean build dockerPrepare \
Expand Down
53 changes: 45 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Healer data processor (0.0.2)
# Healer data processor (0.0.3)

Healer data processor fixes wrong status of events. When a child event has a "failed" status and its parent
has a "success" status, the status of the parent is wrong. Healer finds the parent event and makes its status "failed", too.

## Configuration

There is an example of full configuration for the data processor
There is an example of full configuration (infra-2.0) for the data processor

```yaml
apiVersion: th2.exactpro.com/v1
Expand All @@ -17,12 +17,35 @@ spec:
image-version: <verison>
type: th2-conn
custom-config:
name: test-event-healer
version: 1.0.0
maxCacheCapacity: 1000
stateSessionAlias: my-processor-state
enableStoreState: false
from: 2021-06-16T12:00:00.00Z
to: 2021-06-17T14:00:00.00Z
intervalLength: PT10M
syncInterval: PT10M
awaitTimeout: 10
awaitUnit: SECONDS
events:
bookToScope:
book1: []
book2: []
processorSettings:
name: test-event-healer
version: 1.0.0
maxCacheCapacity: 1000
pins:
- name: server
connection-type: grpc
grpc:
client:
- name: to_data_provider
service-class: com.exactpro.th2.dataprovider.lw.grpc.DataProviderService
linkTo:
- box: lw-data-provider
pin: server
- name: to_data_provider_stream
service-class: com.exactpro.th2.dataprovider.lw.grpc.QueueDataProviderService
linkTo:
- box: lw-data-provider
pin: server
extended-settings:
service:
enabled: true
Expand Down Expand Up @@ -58,4 +81,18 @@ parameters.

+ th2-common - https://github.com/th2-net/th2-common-j

+ th2-crawler - https://github.com/th2-net/th2-crawler
+ th2-crawler - https://github.com/th2-net/th2-crawler

## Release notes

### 0.0.3
* Migrated to th2 gradle plugin `0.1.4` (based on th2-bom: `4.8.0`)
* Updated:
* common: `5.14.0-dev`
* common-utils: `2.3.0-dev`
* processor-core: `0.3.0-dev`
* cradle-cassandra: `5.4.4-dev`
* auto-service: `1.1.1`
* caffeine: `3.1.8`
* kotlin-logging: `3.0.5`
* kotlin: `1.8.22`
83 changes: 26 additions & 57 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
plugins {
id 'com.palantir.docker' version '0.25.0'
id 'java'
id 'java-library'
id 'application'
}

ext {
sharedDir = file("${project.rootDir}/shared")
id "application"
id "org.jetbrains.kotlin.jvm" version "1.8.22"
id "org.jetbrains.kotlin.kapt" version "1.8.22"
id "com.exactpro.th2.gradle.component" version "0.1.4"
}

group 'com.exactpro.th2'
version release_version

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
kotlin {
jvmToolchain(11)
}

repositories {
maven {
name 'MavenLocal'
url sharedDir
}
mavenLocal()
mavenCentral()
maven {
name 'Sonatype_snapshots'
Expand All @@ -30,65 +22,42 @@ repositories {
name 'Sonatype_releases'
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
}
mavenLocal()

configurations.all {
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
}

jar {
manifest {
attributes(
'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
'Specification-Title': '',
'Specification-Vendor': 'Exactpro Systems LLC',
'Implementation-Title': project.archivesBaseName,
'Implementation-Vendor': 'Exactpro Systems LLC',
'Implementation-Vendor-Id': 'com.exactpro',
'Implementation-Version': project.version
)
}
}

dependencies {
api platform('com.exactpro.th2:bom:3.0.0')
compileOnly 'com.google.auto.service:auto-service:1.1.1'
kapt 'com.google.auto.service:auto-service:1.1.1'

implementation 'com.exactpro.th2:common:3.18.2'
implementation "com.exactpro.th2:grpc-crawler-data-processor:0.0.1"
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
implementation 'io.github.microutils:kotlin-logging:3.0.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.18.1'

implementation "com.exactpro.th2:cradle-cassandra:2.14.0"
implementation 'com.exactpro.th2:common:5.14.0-dev'
implementation "com.exactpro.th2:common-utils:2.3.0-dev"
implementation "com.exactpro.th2:processor-core:0.3.0-dev"

implementation "org.slf4j:slf4j-log4j12"
implementation "org.slf4j:slf4j-api"
implementation 'junit:junit:4.13.1'
implementation "com.exactpro.th2:cradle-cassandra:5.4.4-dev"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'

testImplementation group: 'io.grpc', name: 'grpc-testing', version: '1.32.1'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5"
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'

testImplementation "org.junit.jupiter:junit-jupiter-params:5.11.3"
testImplementation "org.junit.jupiter:junit-jupiter:5.11.3"

testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.11.2'
}

test {
useJUnitPlatform()
}

application {
mainClassName 'com.exactpro.th2.healer.BoxMain'
}

applicationName = 'service'

distTar {
archiveName "${applicationName}.tar"
}

dockerPrepare {
dependsOn distTar
}

docker {
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
}
mainClass.set('com.exactpro.th2.processor.MainKt')
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
release_version = 0.0.2
release_version = 0.0.3

description = 'th2 data service for fixing wrong status of events'
vcs_url=https://github.com/th2-net/th2-crawler-event-healer.git
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading