-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
websocket variant of query endpoint (#3936)
* minor improvements on websocket and add websocketIT * add it for websocket, and support config args * add one more test case * make ws config optional * avoid fromTryCatchNonFatal when derivative already exists * spelling and missing type parameter * use richer Matchers in WebsocketServiceIntegrationTest * scalafmt * IDEs may love braces but we don't * utility for simplifying FanOutShape2s; use in ContractsService * split matSecondOut into generalization; make compile again * match matSecondOut utility with standard utility methods * spelling * getCreatesAndArchivesSince doesn't need to query the transaction boundary * boolean newtype utility * split up transactionMessageHandler into components * decodeAndParsePayload passes through the Jwt * clean up config and default WS config * take multiple template IDs for insertDeleteStepSource * replace websocket return with {errors, add, remove}, based on acsFollowingAndBoundary * parse ValuePredicate in websocket * remove unused lfvToJson * nominal internal state for emitted WS steps-and-errors * missing copyright headers * add filtering to convertFilterContracts * add step conflation to websocket output * move conflation to static function * rename /transactions endpoint to /contracts/searchForever * empty requests are not allowed; numConns is per-service * option for GetCreatesAndArchiveSince to not terminate; use in WebsocketService * start of searchForever documentation * stub searchForever longer test * use valueOr * don't run all other tests again with WebsocketServiceIntegrationTest * start of websocket delta test * solve init order problem with AbstractHttpServiceIntegrationTestFuns - previous order caused test set to be cleared; mutation is intuitive for sure! * full flow test, fails for lack of create/exercise yet * passing full flow test * full documentation examples * rename add/remove to created/archived * cleaner NewBoolean.Named * document heartbeats * document subprotocols for searchForever * note about the tests mysteriously terminating * ensure create has happened before attempting query in tests * reorganize multi-step WS test so its states and assertions are clearer * filter out heartbeats in raw string tests * factor out ContractDelta * make exercisePayload easier to read * filter out heartbeats in conversation test * remove type lambda * accept chunked queries - clients may not be in control of how query bodies are delivered to the server, so we should be agnostic in that respect * add changelog CHANGELOG_BEGIN - [JSON API - Experimental] WebSocket contract search at ``/contracts/searchForever``. See `issue #3936 <https://github.com/digital-asset/daml/pull/3936>`_. CHANGELOG_END * adapt to #3991 template ID strings * adapt to #3971 argument -> payload * fix create command for test (string template ID redux) * adapt to #4014 ResolveTemplateId change * update copyright headers * rebuild WS example output to match latest changes - thanks @leo-da * SeqOps is not a safe name * don't need breakOut anymore * use util library form of partitionMap - thanks @leo-da for pointing it out Co-authored-by: lima-da <54044170+lima-da@users.noreply.github.com>
- Loading branch information
Showing
18 changed files
with
820 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.