Skip to content

Commit

Permalink
Synchronize dev branch with dev-version-4 (#49)
Browse files Browse the repository at this point in the history
* Update grpc-service-generator version
* Th2 3775 added `check_simple_collections_order` parameter to `RootComparisonSettings`
* [TH2-4728] Method for waiting for the rule result (#41)
---------
Co-authored-by: Sofia Lobenko <[email protected]>
Co-authored-by: Oleg Smelov <[email protected]>
Co-authored-by: nikita.smirnov <[email protected]>
  • Loading branch information
OptimumCode authored Oct 23, 2023
1 parent 2b949e3 commit e5645b4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
needs: [collect-version]
uses: th2-net/.github/.github/workflows/compaund-python-grpc-pypi-publication.yml@main
with:
custom-version: ${{ needs.collect-version.outputs.versionNumber }}-dev
custom-version: ${{ needs.collect-version.outputs.versionNumber }}rc1
secrets:
pypi_password: ${{ secrets.PYPI_PASSWORD }}
scan:
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 gRPC check1 library (4.2.0)
# th2 gRPC check1 library (4.3.0)

This library contains proto messages and `Check1` service with RPC methods that are used
in [th2 check1](https://github.com/th2-net/th2-check1 "th2-check1").
Expand Down Expand Up @@ -47,6 +47,13 @@ If you wish to manually create and publish a package for Python:
## Release notes
### 4.3.0
+ Update to `th2-grpc-common` version `3.12.0` (added `check_simple_collections_order` parameter to `RootComparisonSettings`).
+ gRPC method `WaitForResult` added
+ `WaitForResult` method added
+ `store_result` parameter added to rule creation requests, `rule_id` added to responses
### 4.2.0
+ Added golang specific properties
Expand Down Expand Up @@ -119,4 +126,4 @@ If you wish to manually create and publish a package for Python:
### 3.2.0
+ Implement stubs creation for Python
+ Implement stubs creation for Python
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repositories {

dependencies {
api platform('com.exactpro.th2:bom:4.4.0')
api 'com.exactpro.th2:grpc-common:4.3.0-dev'
api 'com.exactpro.th2:grpc-common:4.4.0-sync-6560421959-ba094c0-SNAPSHOT'

api "com.google.protobuf:protobuf-java-util"
api "io.grpc:grpc-stub"
Expand Down Expand Up @@ -225,4 +225,4 @@ licenseReport {
]
excludeOwnGroup = false
allowedLicensesFile = new URL("https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json")
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
release_version=4.2.0
release_version=4.3.0
description='th2 gRPC check1 library'

vcs_url=https://github.com/th2-net/th2-grpc-check1
2 changes: 1 addition & 1 deletion package_info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"package_name": "th2_grpc_check1",
"package_version": "4.2.0"
"package_version": "4.3.0"
}
26 changes: 22 additions & 4 deletions src/main/proto/th2_grpc_check1/check1.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 Exactpro (Exactpro Systems Limited)
* Copyright 2020-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 All @@ -17,6 +17,7 @@
syntax = "proto3";

import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "th2_grpc_common/common.proto";

option java_multiple_files = true;
Expand All @@ -28,6 +29,7 @@ service Check1 {
rpc submitCheckRule (CheckRuleRequest) returns (CheckRuleResponse) {}
rpc submitCheckSequenceRule(CheckSequenceRuleRequest) returns (CheckSequenceRuleResponse) {}
rpc submitNoMessageCheck(NoMessageCheckRequest) returns (NoMessageCheckResponse) {}
rpc waitForResult(WaitForResultRequest) returns (WaitForResultResponse) {}
}

message CheckpointRequest {
Expand All @@ -49,8 +51,9 @@ message CheckRuleRequest {
reserved 2;
RootMessageFilter root_filter = 10;
Checkpoint checkpoint = 3; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
int64 message_timeout = 11; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 message_timeout = 11; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 4; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 13; // Store the result of the rule for later request by the client
reserved 5; // ReportId reportId = 5; reserved now
EventID parent_event_id = 6;
string description = 7;
Expand All @@ -63,6 +66,7 @@ message CheckRuleRequest {
message CheckRuleResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}

message CheckSequenceRuleRequest {
Expand All @@ -73,8 +77,9 @@ message CheckSequenceRuleRequest {
*/
repeated RootMessageFilter root_message_filters = 12;
Checkpoint checkpoint = 3; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
int64 message_timeout = 13; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 message_timeout = 13; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 4; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 16; // Store the result of the rule for later request by the client
ConnectionID connectivity_id = 5;
reserved 6; // ReportId reportId = 5; reserved now
EventID parent_event_id = 7;
Expand All @@ -90,6 +95,7 @@ message CheckSequenceRuleRequest {
message CheckSequenceRuleResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}

message PreFilter {
Expand All @@ -100,8 +106,9 @@ message PreFilter {

message NoMessageCheckRequest {
PreFilter pre_filter = 1;
int64 message_timeout = 2; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 message_timeout = 2; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 3; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 11; // Store the result of the rule for later request by the client
Checkpoint checkpoint = 4; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
ChainID chain_id = 5; // You can use it to unite the next rule to the chain with currently submitted one
ConnectionID connectivity_id = 6;
Expand All @@ -114,4 +121,15 @@ message NoMessageCheckRequest {
message NoMessageCheckResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}

message WaitForResultRequest {
int64 rule_id = 1;
google.protobuf.Duration timeout = 2; // Timeout for waiting for result
}

message WaitForResultResponse {
RequestStatus status = 1;
EventStatus rule_result = 2;
}

0 comments on commit e5645b4

Please sign in to comment.