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-1686] Use a common executor for running check rules #142

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
48 changes: 0 additions & 48 deletions .github/workflows/dev-docker-publish.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/dev-java-publish-sonatype-and-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dev build and publish Java distributions to sonatype snapshot repository

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

jobs:
build-job:
uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
with:
build-target: 'Sonatype,Docker'
runsOn: ubuntu-latest
gradleVersion: '7'
docker-username: ${{ github.actor }}
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 }}



53 changes: 0 additions & 53 deletions .github/workflows/dev-java-publish-sonatype.yml

This file was deleted.

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

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/java-publish-sonatype-and-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and release Java distributions to sonatype.

on:
push:
branches:
- master
- version-*
paths:
- gradle.properties

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 }}
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 }}
27 changes: 0 additions & 27 deletions .github/workflows/java-publish-sonatype.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ The `th2_check1_active_tasks_number` metric separate rules with label `rule_type
+ Support for disabling of order verification for simple collection
+ Switch for events publication in checkpoint request. Parameter `enable-checkpoint-events-publication` should be used for that.

### 3.9.1

#### Changed:
+ Migrated `sailfish-utils` version from `3.12.2` to `3.12.3`
+ Improved condition output format for `EQ_PRECISION`, `WILDCARD`, `LIKE`, `IN`, `MORE`, `LESS` operations and their negative versions
+ Changed the way the check1 works with threads internally.
Now it uses a common executor for running check rules instead of creating an executor per each rule

### 3.9.0

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ test {
}

application {
mainClassName 'com.exactpro.th2.check1.Check1Main'
mainClass.set('com.exactpro.th2.check1.Check1Main')
}

applicationName = 'service'

distTar {
archiveName "${applicationName}.tar"
archiveFileName.set("${applicationName}.tar")
}

dockerPrepare {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/
package com.exactpro.th2.check1.util;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.exactpro.sf.aml.AMLLangConst;
Expand Down Expand Up @@ -85,7 +83,7 @@ private static void toMetaContainer(String fieldName, ValueFilter value, MetaCon
Set<String> keyFields, boolean listItemAsSeparate) {
if (value.hasMessageFilter()) {
parent.add(fieldName, toMetaContainer(value.getMessageFilter(), listItemAsSeparate));
} else if (value.hasListFilter() && value.getListFilter().getValues(0).hasMessageFilter()) {
} else if (value.hasListFilter() && containsMessageFilter(value.getListFilter())) {
if (listItemAsSeparate) {
convertListAsSeparateContainers(parent, fieldName, value.getListFilter());
} else {
Expand Down Expand Up @@ -116,4 +114,8 @@ private static void convertListAsSeparateContainers(MetaContainer parent, String
}
parent.add(fieldName, result);
}

private static boolean containsMessageFilter(ListValueFilter listFilter) {
return listFilter.getValuesCount() > 0 && listFilter.getValues(0).hasMessageFilter();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package com.exactpro.th2.check1

import io.reactivex.observers.DisposableObserver
import mu.KotlinLogging
import org.slf4j.Logger
import org.slf4j.LoggerFactory

Expand All @@ -26,8 +27,7 @@ abstract class AbstractSessionObserver<T> : DisposableObserver<T>() {
}

companion object {
@Suppress("JAVA_CLASS_ON_COMPANION")
@JvmField
val LOGGER: Logger = LoggerFactory.getLogger(javaClass.enclosingClass)
val LOGGER: Logger = LoggerFactory.getLogger(AbstractSessionObserver::class.java)
}
}
Loading