* Test for duplicate contracts when querying on behalf of multiple parties
Fixes#9388
changelog_begin
changelog_end
* Optimize imports
* Thanks to @S11001001 for answering the comment
* Re-structure the test following @S11001001's input in https://github.com/digital-asset/daml/pull/9443#discussion_r616083932 -- thanks
* comparison queries
* name the contract primary key constraint
* use ignore_row_on_dupkey_index instead of merge
- suggested by @cocreature in #9286 f7b2f14294fa33d6804251ce841529a1e2bd298d; thanks
* retrySqlStates for oracle
* enable all non-websocket tests
* name the template_id primary key constraint
* clean up concatFragment calls
* add Websocket tests for oracle
* move iouCreateCommand to be usable by oracle integration tests
* work around Scala 2.12 NPE in Source
* multiquery support for Oracle
* matchedQueries, therefore query-stream support for Oracle
* enable websocket tests
* test '& bar' and 5kb strings
- 5kb string fails on Oracle with
ORA-01704: string literal too long
* refine the long data cases; gets too long at 4000 bytes as expected
- however, the predicate fails for unknown reason before then; possibly a missed
escape character case
* handle long data with a fallback
- now the predicate fails in all cases instead of a SQL error, which is...better
* only interpolate true, false, null into JSON predicate conditions
- the problem was with JSON-formatted data; it must be SQL-typed instead
* adapt equal's large-data solution for comparison as well
- only works for numbers and strings, but that's all we need to compare
* move Implicits to Queries
* remove stray spaces in output
* test Oracle query expressions alongside Postgresql
* test that bools aren't compared like numbers and strings
* test @> conjunctions and special {}-query handling
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* note on PASSING ... AS X
- suggested by @cocreature; thanks
* remove printlns; these functions don't really need scaffolding anymore
- suggested by @stefanobaghino-da; thanks
CHANGELOG_BEGIN
- [LF] Release LF 1.12. This version reduce the size of transaction
- [Compiler]: Change the default LF output from 1.8 to 1.11.
CHANGELOG_END
* SupportedJdbcDriver box for the required DB-specific implicits and magic values
* replace postgres references with the SupportedJdbcDriver box
* explaining the typeclass
* labels for debugging
* allow external initialization of SupportedJdbcDriver, but not usage
* thread SupportedJdbcDriver everywhere, hang it off of ContractDao
* remove unused dep from integration tests
* split Queries into an agnostic part and a DB-specific part
* document withOptPrefix
* reformat
* SQL syntax more amenable to refactoring
* different sets of DDL for different backends
* make everything use queries passed around everywhere (usually via ContractDao)
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.
As announced, this will be merged on Saturday to avoid too many conflicts.
changelog_begin
changelog_end
* Upgrade Scala dependencies for 2.13 compatibility
This upgrades a bunch of Scala libraries to versions that have 2.13
support. There are two libraries that are still missing:
- diffson, this has a new version but with significant breaking
changes and it is only used in Naigator console which I hope to kill
before I have to worry about this.
- ai.x:diff, this is used in the ledger API test tool. The library is
abondened but there are a few alternatives.
changelog_begin
changelog_end
* Fix pureconfig
changelog_begin
changelog_end
* Fix Navigator
changelog_begin
changelog_end
* Upgrade akka and akka-http
Was chasing an issue somewhere and thought this might affect it in
some way. It didn’t but I might as well turn the upgrade into a PR.
changelog_begin
changelog_end
* Fix trigger service tests
changelog_begin
changelog_end
* Downgrade akka-http again
changelog_begin
changelog_end
* Upgrade akka-http again and fix tests
changelog_begin
changelog_end
* Cleanup trigger service
changelog_begin
changelog_end
* Add healthcheck endpoints to JSON API
This PR adds /livez and /readyz (following k8s naming scheme) that can
be used as liveness and readyness check. There isn’t much we can do
for liveness apart from showing that we can still respond to http
requests but readyness can be a bit more clever and check the ledger
connection as well as the database connection.
changelog_begin
- [JSON API] Add `/livez` and `/readyz` health check endpoints for
easier integration with k8s and other schedulers.
changelog_end
* I hate windows
changelog_begin
changelog_end
This PR extends the failure tests with one that establishes a
websocket connection, kills the connection and reenables it at the
last offset.
changelog_begin
changelog_end
The previous restriction was both too lax and too strict now that we
have multi pary queries:
1. It allowed a party in `readAs` for command submissions which just
fails on the ledger side. Changing this is technically breaking but
only if you used a token that would have been rejected as soon as you
enabled auth so that seems very resonable to break.
2. It didn’t allow extra parties in `readAs`.
This PR switches to requiring exactly one party in `actAs` while
supporting multiple parties in `readAs`.
changelog_begin
- [JSON API] JWTs on command submissions can now contain extra parties
in the `readAs` field. `actAs` is still limited to a single party.
changelog_end
* Add tests for connection failures in the JSON API
This PR adds some toxiproxy based tests to see how the JSON API reacts
if the connection to the ledger is killed. There are a bunch of
inconsistencies here in the tests some of which we might want to
address and the others we should at least document but I’ll leave that
for future PRs.
changelog_begin
changelog_end
* Import HttpServiceTestFixture instead of prefixing
changelog_begin
changelog_end
* reintroducing the main
* Introducing `ledger-service/http-json-testing`
* cleaning up
* Starting sandbox and json-api from perf-test main
changelog_begin
changelog_end