From e5645b43ead39bbe2654630271748749cf7fa4eb Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Mon, 23 Oct 2023 11:57:36 +0400 Subject: [PATCH] Synchronize dev branch with dev-version-4 (#49) * 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 <56396252+lsoph@users.noreply.github.com> Co-authored-by: Oleg Smelov <45400511+lumber1000@users.noreply.github.com> Co-authored-by: nikita.smirnov --- .../dev-release-grpc-service-pypi-publish.yml | 2 +- README.md | 11 ++++++-- build.gradle | 4 +-- gradle.properties | 2 +- package_info.json | 2 +- src/main/proto/th2_grpc_check1/check1.proto | 26 ++++++++++++++++--- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dev-release-grpc-service-pypi-publish.yml b/.github/workflows/dev-release-grpc-service-pypi-publish.yml index ad156d6..0cdb8d1 100644 --- a/.github/workflows/dev-release-grpc-service-pypi-publish.yml +++ b/.github/workflows/dev-release-grpc-service-pypi-publish.yml @@ -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: diff --git a/README.md b/README.md index 5b878cf..ea91f18 100644 --- a/README.md +++ b/README.md @@ -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"). @@ -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 @@ -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 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3fa339d..9cb0b0d 100644 --- a/build.gradle +++ b/build.gradle @@ -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" @@ -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") -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index fd70bec..0b45a24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/package_info.json b/package_info.json index 07d2b00..6748753 100644 --- a/package_info.json +++ b/package_info.json @@ -1,4 +1,4 @@ { "package_name": "th2_grpc_check1", - "package_version": "4.2.0" + "package_version": "4.3.0" } \ No newline at end of file diff --git a/src/main/proto/th2_grpc_check1/check1.proto b/src/main/proto/th2_grpc_check1/check1.proto index 70fef12..27521af 100644 --- a/src/main/proto/th2_grpc_check1/check1.proto +++ b/src/main/proto/th2_grpc_check1/check1.proto @@ -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. @@ -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; @@ -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 { @@ -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; @@ -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 { @@ -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; @@ -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 { @@ -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; @@ -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; } \ No newline at end of file