Commit Graph

7 Commits

Author SHA1 Message Date
Moritz Kiefer
d83cbdb475
Upgrade akka and akka-http (#8048)
* 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
2020-11-25 10:13:51 +01:00
Moritz Kiefer
a74a1c15f4
Add healthcheck endpoints to JSON API (#7852)
* 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
2020-11-02 18:41:49 +01:00
Moritz Kiefer
339704dd14
Tests for timeouts to/from ledger in JSON API failure tests (#7791)
* Tests for timeouts to/from ledger in JSON API failure tests

changelog_begin
changelog_end

* Update ledger-service/http-json-testing/src/main/scala/com/daml/http/HttpServiceTestFixture.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Update ledger-service/http-json-testing/src/main/scala/com/daml/http/HttpServiceTestFixture.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Apply suggestions from code review

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2020-10-26 09:08:03 +01:00
Moritz Kiefer
19a7f326f1
Include streaming API in JSON API failure tests (#7783)
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
2020-10-23 09:12:09 +02:00
Moritz Kiefer
9da86a602e
Relax restrictions on JWTs on write endpoints in JSON API (#7712)
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
2020-10-20 19:37:44 +02:00
Moritz Kiefer
ea453c35cf
Add tests for connection failures in the JSON API (#7751)
* 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
2020-10-20 18:59:11 +02:00
Leonid Shlyapnikov
20e2922b3e
JSON API perf test main that starts sandbox and json-api services (#7283)
* reintroducing the main

* Introducing `ledger-service/http-json-testing`

* cleaning up

* Starting sandbox and json-api from perf-test main

changelog_begin
changelog_end
2020-08-31 22:55:01 +00:00