-
Notifications
You must be signed in to change notification settings - Fork 205
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
participant-integration-api: Switch to the v2 participant state API. [KVL-1002] #10398
Conversation
ledger/sandbox-classic/src/main/scala/platform/sandbox/stores/ledger/ScenarioLoader.scala
Outdated
Show resolved
Hide resolved
ledger/participant-state/src/main/scala/com/daml/ledger/participant/state/v2/Update.scala
Show resolved
Hide resolved
...ticipant-state/src/main/scala/com/daml/ledger/participant/state/v2/DeduplicationPeriod.scala
Show resolved
Hide resolved
ledger/participant-state/src/main/scala/com/daml/ledger/participant/state/v2/ChangeId.scala
Show resolved
Hide resolved
...er/participant-state/src/main/scala/com/daml/ledger/participant/state/v1/SubmitterInfo.scala
Outdated
Show resolved
Hide resolved
ledger/participant-integration-api/src/test/suite/scala/platform/store/ConversionsSpec.scala
Show resolved
Hide resolved
...gration-api/src/main/scala/platform/apiserver/execution/LedgerTimeAwareCommandExecutor.scala
Show resolved
Hide resolved
...src/test/suite/scala/com/digitalasset/ledger/api/validation/SubmitRequestValidatorTest.scala
Outdated
Show resolved
Hide resolved
`CompletionInfo` is identical to `SubmitterInfo`. Its purpose is to make the migration to v2 easier. It should not make it into the final version.
This means that: - the API server and indexer expect v2 API traits - adapters are provided if you need to elevate your v1 API usage - the indexer internally uses v2 Updates - rejections are switched over to use the v2 format - Sandbox Classic uses v2 as the internal representation too (because it interacts directly with the underlying indexer representation, and is therefore tightly coupled) _kvutils_ and other users of the `StandaloneApiServer` and `StandaloneIndexerServer` use the adapters. CHANGELOG_BEGIN - [Integration Kit] The API server and indexer have switched over to v2 of the participant-state API. You can continue to use the v1 API, but you will need to wrap your ``ReadService`` and ``WriteService`` objects in the ``AdaptedV1ReadService`` and ``AdaptedV1WriteSerivce`` classes. CHANGELOG_END
It's served its purpose.
6773acf
to
2efbc76
Compare
…egration-api/v2-state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (but consider that my context is somewhat limited)
...ger-api-common/src/main/scala/com/digitalasset/ledger/api/validation/CommandsValidator.scala
Outdated
Show resolved
Hide resolved
...i-common/src/main/scala/com/digitalasset/platform/server/api/validation/ErrorFactories.scala
Show resolved
Hide resolved
ledger/participant-integration-api/src/main/scala/platform/store/dao/JdbcLedgerDao.scala
Outdated
Show resolved
Hide resolved
Just a little bit of cleanup.
…egration-api/v2-state
...cipant-integration-api/src/main/scala/platform/apiserver/services/ApiSubmissionService.scala
Outdated
Show resolved
Hide resolved
And introduce a trait, because, well, this is still the JVM.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
...cipant-integration-api/src/main/scala/platform/apiserver/services/ApiSubmissionService.scala
Show resolved
Hide resolved
case state.SubmissionResult.NotSupported => | ||
logger.info("Setting an initial ledger configuration is not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mziolekda pointed out that removing this might cause issues with ledgers + drivers such as Canton that don't support submitting configuration. As these drivers have other ways of managing configuration, I'm going to change LedgerConfiguration
to allow them to state that we should never submit a new configuration, instead just waiting indefinitely for one to show up. @oliverse-da has agreed this approach will work for Canton.
I'll make this change separately.
…egration-api/v2-state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
That's a big PR indeed. Mostly boiler plate on the storage side though.
Agreed, it's huge. If it helps, imagine how big it would have been if we did it in one PR instead of 17. |
In which we draw the rest of the owl.
Switching to the v2 participant state API means:
kvutils and other users of the
StandaloneApiServer
andStandaloneIndexerServer
use the adapters.Changelog
ReadService
andWriteService
objects in theAdaptedV1ReadService
andAdaptedV1WriteSerivce
classes.Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.