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

Backport #10883 and #10918 #10924

Merged
merged 4 commits into from
Sep 20, 2021
Merged

Backport #10883 and #10918 #10924

merged 4 commits into from
Sep 20, 2021

Conversation

nicu-da
Copy link
Contributor

@nicu-da nicu-da commented Sep 17, 2021

Backport:

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

…ce [KVL-1099] (#10883)

* Add conformance test for command deduplication using the CommandService

CHANGELOG_BEGIN

CHANGELOG_END

(cherry picked from commit f4adee9)
@nicu-da nicu-da requested review from a team as code owners September 17, 2021 07:29
@hubert-da
Copy link
Collaborator

Requires #10928

@andreaslochbihler-da andreaslochbihler-da added the needs-backport Candidate fix for backporting to the latest release branch label Sep 20, 2021
* Reorder the observers for StreamConsumer to first filter and then take just one element, not the other way around

CHANGELOG_BEGIN
CHANGELOG_END

* Refactor the test to get better stacktraces during failures

* Remove unused import
@hubert-da hubert-da changed the title Backport #10883 Backport #10883 and #10918 Sep 20, 2021
@hubert-da
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@hubert-da hubert-da enabled auto-merge (squash) September 20, 2021 11:45
val duplicateResponses =
alreadyExistsResponses + internalResponses + abortedResponses
assert(
okResponses == 1 && duplicateResponses == numberOfParallelRequests - 1,
Copy link

Choose a reason for hiding this comment

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

Suggested change
okResponses == 1 && duplicateResponses == numberOfParallelRequests - 1,
okResponses == 1 && duplicateResponses == expectedDuplicateResponses,

ledger: ParticipantTestContext,
party: Party,
request: T,
submitRequestAndGetStatus: T => Future[Code],
Copy link

Choose a reason for hiding this comment

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

Suggested change
submitRequestAndGetStatus: T => Future[Code],
submitRequestAndGetStatusCode: T => Future[Code],

import com.daml.ledger.client.binding.Primitive.Party
import com.daml.ledger.test.model.Test.DummyWithAnnotation
import com.daml.ledger.test.model.Test.{Dummy, DummyWithAnnotation}
import io.grpc.Status
import io.grpc.Status.Code
Copy link

Choose a reason for hiding this comment

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

I prefer not to import Code and instead use Status.Code. I find it clearer. Your call though.

case GrpcException(status, _) =>
Future.successful(status.getCode)
case NonFatal(otherException) =>
fail(s"Not a GRPC exception $otherException", otherException)
Copy link

Choose a reason for hiding this comment

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

Why include the exception twice?

Suggested change
fail(s"Not a GRPC exception $otherException", otherException)
fail(s"Not a GRPC exception.", otherException)

@ghost
Copy link

ghost commented Sep 20, 2021

None of my comments are mandatory for the backport. I just saw them now and I figured we can address these on main, so I wanted to capture them.

@digital-asset digital-asset deleted a comment from azure-pipelines bot Sep 20, 2021
@hubert-da hubert-da merged commit 1dff2f4 into release/1.17.x Sep 20, 2021
@hubert-da hubert-da deleted the nicuda/port_new_test branch September 20, 2021 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-backport Candidate fix for backporting to the latest release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants