Commit Graph

186 Commits

Author SHA1 Message Date
mziolekda
70d7e49312
support custom scope in access tokens (#17631)
* support custom scope in access tokens

* fix problem with ledger client

* fix broken tests
2023-10-26 08:35:16 +02:00
Andreas Triantafyllos
44c0c51bb3
Refactor ledger/error (#17509) 2023-09-29 17:51:32 +02:00
Remy
623f305e9c
Move canton directory to let place for code drop (#17506) 2023-09-29 14:37:01 +00:00
mziolekda
06abd5c649
Clean up ledger dependencies (#16894)
* remove sandbox-on-x project

update bazel readme

update release artifacts

comment out last remaining SoX test

remove ledger-runner-common

remove participant-state-kv-errors

remove recovering-indexer-integration-tests

remove participant-integration-api

update doc pages

cleanup ledger-api-auth usage

remove participant-state

fix build

fix build

clean up ledger-api-common part I

clean up ledger-api-comon part II

clean up ledger-api-common part III

remove ledger/metrics

clean up ledger-api-health and ledger-api-domain

* remove ledger-configuration ad ledger-offset

* remove ledger-grpc and clean up participant-local-store

* reshuffle few more classes

* format
2023-05-23 13:44:17 +00:00
mziolekda
95cc249ddd
Remove sandbox on x (#16890)
* remove sandbox-on-x project

* update bazel readme

* update release artifacts

* comment out last remaining SoX test

* remove ledger-runner-common

* remove participant-state-kv-errors

* remove recovering-indexer-integration-tests

* remove participant-integration-api

* update doc pages

* cleanup ledger-api-auth usage

* remove participant-state

* fix build

* fix build
2023-05-23 09:25:54 +02:00
Remy
81272e313d
Move com.daml.caching in libs-scala (#16868) 2023-05-22 15:32:53 +00:00
mziolekda
ac0bac67ef
reduce the usage of sandbox-on-x (#16878)
* reduce the usage of sandbox-on-x

* fix broken build

* fix build

* drop tests of very old compilers that are not supported by canton

* stop building sandbox-on-postgres when it is not used anyway

* drop tests of very old triggers that are not supported by canton
2023-05-22 14:38:37 +02:00
Remy
a863d69d34
Move CatonFixture in its own bazel module (#16824) 2023-05-10 23:15:26 +00:00
Samuel Williams
537447d92c
Json Api tests to canton (#16782)
Co-authored-by: Remy <remy.haemmerle@daml.com>
2023-05-10 16:01:39 +01:00
Remy
90c023e98e
Migrate LedgerClient test from to Canton (#16795) 2023-05-10 11:16:40 +02:00
Brian Healey
b80dca2dd8
identity provider id awareness for party and user management apis through ledger client (#16632)
* identity provider id awareness for party and user management apis through ledger client

* none case for ObjectMetadata translation
2023-03-30 18:26:53 +00:00
mziolekda
bba520dc57
Fix updating of the audience field in IDP (#16630) 2023-03-30 10:52:32 +00:00
Brian Healey
6c874e8bd2
Add identity provider config to ledger client (#16625)
* IdentityProviderConfigService through ledger client: create config

* IdentityProviderConfigService through ledger client: get config

* IdentityProviderConfigService through ledger client: list configs

* IdentityProviderConfigService through ledger client: delete config
2023-03-30 09:47:05 +02:00
Brian Healey
6a3a7a84a4
implement updateUser in ledger client (#16589)
* implement updateUser in ledger client

* Use unique parties for updateUser trigger test

* scalafmt
2023-03-23 00:12:54 +00:00
mziolekda
1a3980bf89
Separate test-common from the rest of the ledger code (#16307)
* move files

* format

* wrong file

* fix conformance tests

* add readme

* fix compatibility tests

* fix haskell tests
2023-02-14 15:29:13 +00:00
mziolekda
d9974984fd
Remove circular dependency on the //ledger project caused by ledger-resources [DPP-1410] (#16295)
* remove circular dependency on the //ledger project caused by ledger-resources

* format
2023-02-13 08:38:44 +00:00
Nicu Reut
f370124518
Rename telemetry to tracing [PLEN-70] (#16073) 2023-01-17 09:22:31 +01:00
Gary Verhaegen
151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00
Nicu Reut
25f1254120
Move the metrics API to the observability module [PLEN-35] (#15831) 2022-12-12 09:35:55 +00:00
Sergey Kisel
e880f26b36
Identity Provider Management exposed via API [DPP-1334] (#15774) 2022-12-09 10:25:14 +01:00
Sergey Kisel
1c6f6a748b
IdentityProviderId support for the persistence layer of user/party management [DPP-1332] (#15716) 2022-12-02 16:12:04 +01:00
Oliver Seeliger
da67ee7066
LedgerClient admin pruning hook (#15679)
CHANGELOG_BEGIN
CHANGELOG_END
2022-11-24 20:35:33 +01:00
tudor-da
346bb48904
Extract Ledger API error definitions in //ledger/ledger-api-errors [DPP-1269] (#15439)
* Extract Ledger API error definitions in //ledger/error-definitions

changelog_begin
SERVICE_INTERNAL_ERROR error code is created in CommonErrors and replaces the usage of LEDGER_API_INTERNAL_ERROR in ledger-api-client (as a fix).
changelog_end

* Tests in //ledger/error do not depend on //ledger/ledger-api-errors

* Remove unused dependency from //ledger/error

changelog_begin
changelog_end

* Address Martino's comment
2022-11-07 17:24:43 +01:00
Nicu Reut
e8c7e29ba2
Add labels through the MetricsContext in the metrics API [PLEN-5] (#15349) 2022-10-27 09:26:03 +02:00
Nicu Reut
f550b69463
Reorganize the metrics package structure [PLEN-29] (#15312) 2022-10-25 10:05:40 +00:00
Nicu Reut
5b4c7f7677
Extract metrics API that is decoupled from dropwizard [PLEN-28] (#15231) 2022-10-21 16:30:21 +02:00
pbatko-da
fd86551873
[DPP-1278] Shuffle party related domain classes (#15276)
changelog_begin
changelog_end

Status quo:
ledger-api-domain's domain object contained three classes related to parties:
 1. `PartyDetails`, the oldest, which didn't contain the metadata field and was used both in client and indexer code,
 2. `ParticipantPartyDetails`, added recently during the participant-local metadata extensions, similar to the `PartyDetails` above but additionally contains the metadata field,
 3. `PartyRecord` which held participant-local metadata extensions for a party.

Changes:
 1) `PartyDetails` gets renamed to `IndexerPartyDetails` and together with `PartyEntry` gets moved to participant-state-index Bazel package and is removed from client code,
 2) `ParticipantPartyDetails` gets renamed to `PartyDetails` and is now used in the client code instead.
 3) `PartyRecord` gets moved to participant-local-store Bazel package
2022-10-20 09:23:34 +00:00
atriantafyllos-da
507f18ad20
Dpp 1222 move metric tagging classes to daml sdk (#15067)
Moved canton's tagging metric class [DPP-1222].

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-03 14:23:07 +02:00
pbatko-da
ca81adeb3e
6 - Ledger API changes for UM/UP extensions for Hub [DPP-1211] (#14937)
changelog_begin

[Ledger API Specification]:
1. Add 'is_deactivated' attribute to participant users.
2. Introduce participant server's local metadata for parties and participant users consisting of:
 - a resource version for optional concurrent change control,
 - modifiable key-value based annotations.
3. Add experimental update RPCs for parties and participant users:
  - participant user's modifiable fields are: 'primary_party', 'is_deactivated', 'metadata.annotations',
  - party's modifiable fields are 'local_metadata.annotations'.
4. Discourage use of 'party_details.display_name' in favor of using party's metadata annotations.

changelog_end


Other notes:

- no-op updates are allowed,
- update paths are resource relative,
- as annotation deletion is by providing an key with the empty string value,
- as a corollary, only non-empty strings are valid annotation values.
2022-09-26 12:56:55 +00:00
Sergey Kisel
6a80a1a82f
Removal of sandbox-classic module and binary (#14201)
* Removal of sandbox-classic module and binary

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:09:51 +02:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
pbatko-da
c6a0275f6e
[Error codes] Fill in missing contexts that were lost where reflection based context population was removed [DPP-606] (#13264)
And rename error arguments that haven't been in camel case yet.

changelog_begin
changelog_end
2022-03-16 15:07:24 +01:00
pbatko-da
fbb3ba55c2
Simplify implementations of BaseError trait [DPP-606] (#13185)
1. Remove `BaseError.Impl`, `LoggingTransactionErrorImpl` and `LoggingPackageServiceError` 
and instead provide more direct `DamlError` and `DamlErrorWithDefiniteAnswer`.


2. Remove custom implementation of `TransactionError.rpcStatus` and instead provide simpler one in `DamlErr.r.rpcStatus` (which works by first calling `code.asGrpcStatus` and then converting the result to `com.google.rpc.status.Status`).

3. Remove `GrpcStatus.toProto` and instead use `DamlError.rpcStatus`.

4. Use `asGrpcStatus` and `asGrpcError`  instead of `asGrpcStatusFromContext` and `asGrpcErrorFromContext` where possible.


changelog_begin
changelog_end
2022-03-10 12:12:14 +01:00
Simon Maxen
1d40c55177
Add metering report http endpoint [DPP-855] (#13147)
* Added metering report http endpoint

changelog_begin
Added metering report http endpoint
changelog_end

* Update with review comments
2022-03-09 14:59:08 +00:00
pbatko-da
c7c211e4df
Remove most of ErrorFactories [DPP-606] (#13146)
changelog_begin
changelog_end
2022-03-07 16:15:21 +01:00
pbatko-da
15aa300fba
Use DamlContextualizedErrorLogger.forTesting (#13137)
changelog_begin
changelog_end
2022-03-04 12:24:08 +01:00
pbatko-da
af27f5d926
Make ErrorFactories into an object in preparation for its removal. [DPP-606] (#13143)
changelog_begin
changelog_end
2022-03-04 09:35:38 +01:00
Kamil Bozek
dfd38186fe
Remove pre-1.18 error codes [DPP-773] (#12841)
* Remove legacy error codes

CHANGELOG_BEGIN
CHANGELOG_END

* Remove ValidatorFixture

* Removed redundant helper function

* Remove redundant object

* Rebased.

run-full-compat: true

* Rebased.

run-full-compat: true
2022-02-15 15:28:36 +01:00
pbatko-da
f2b7902c68
[User management] Add CreateUserResponse and GetUserResponse gRPC response wrappers [DPP-854] (#12682)
changelog_begin
Ledger API Specification: CreateUser and GetUser endpoints of UserManagementService now return the CreateUserResponse or GetUserResponse messages, whereas previously they were returning the User message).
changelog_end
2022-02-08 12:29:57 +01:00
tudor-da
14a0459f0a
SandboxNextFixture replaced by SOX-based SandboxFixture (#12654)
* SandboxNextFixture replaced by Sandbox-on-X based SandboxFixture

changelog_begin
changelog_end

* Some fixed tests

* No direct dependencies on //ledger/sandbox:sandbox and //ledger/sandbox:sandbox-scala-tests-lib

* Fix after rebase

* Rename SandboxFixture and add a missing dep

* Generate valid party names if hint is empty

* Smaller maxInboundMessageSize

* Added test for empty display name

* SandboxServer is a ResourceOwner
* Uses execution context passed as an input for resource management
* Fixes flaky FlywayMigrations issue with null Thread.currentThread.currentClassLoader
* SandboxServer simplification returns Port instead of ApiServer

* Dedicated PMAllocateWithoutDisplayName for non-Canton ledgers
* Created since Canton does not return empty display names
2022-02-07 09:25:22 +01:00
Adriaan Moors
e3bae961cc
VersionClient supports getApiFeatures (#12724)
* VersionClient supports getApiFeatures

This exposes the `features` part of the version service's
`GetLedgerApiVersionResponse` protobuf.

Map the protobuf to user-friendly subclasses of `Feature`,
defined in `c.d.ledger.api.domain`.

VersionClient does not expose experimental features, as they
are meant for internal testing only.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
2022-02-04 16:02:36 +00:00
pbatko-da
6926e9adb4
Deprecate user identity service [DPP-862] (#12694)
changelog_begin
Ledger API Specification: Ledger Identity service is now deprecated.
changelog_end
2022-02-04 10:32:09 +01:00
pbatko-da
7137b46543
[User management] Use pagination for listing users [DPP-840] (#12610)
CHANGELOG_BEGIN
Ledger API Specification: UserManagementService.ListUsers is now using pagination
CHANGELOG_END
2022-02-03 20:32:50 +01:00
Brian Healey
e70237a673
upgrade scalapb/netty/grpc/protobuf in proven combination (#12628)
* upgrade scalapb/netty/grpc/protobuf in proven combination

CHANGELOG_BEGIN
Upgrade scalapb, netty, grpc, protobuf and guava versions
CHANGELOG_END

* bazel reformat

* match grpc version in deps.bzl

* upgrade akka

* keep grpc version to 1.43 that is used in latest nixpkgs-unstable

* rebase and regen

* update SHA for scalapb tarball

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2022-02-03 08:38:38 -05:00
Adriaan Moors
810554bee5
Use Seq instead of Vector in user mgmt apis (#12725)
For consistency with other APIs in this area.
Note that some pre-existing APIs use `List` instead of `Seq`,
but at least those use the same underlying implementation.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 13:52:53 +01:00
tudor-da
bb5722cd1b
Move sandbox-classic test lib and IT tests to Sandbox-on-x (#12641)
* Moved SandboxFixture and IT tests to Sandbox-on-X

changelog_begin
changelog_end

* Addressed review comments
2022-01-31 12:49:46 +01:00
Stefano Baghino
aec3390904
Replace silencer plugin with built-in warning configuration (#12543)
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.

[Here][1] is s a blog post by the Scala team about it.

Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.

Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.

changelog_begin
changelog_end

[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
2022-01-24 15:01:35 +00:00
Moritz Kiefer
688f1e1e0b
Drop v0 contract ids (#12464)
* Drop v0 contract ids

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-20 15:28:27 +00:00
Stefano Baghino
4af48bbccc
Split channel configuration from LedgerClientConfiguration (#12433)
* Split channel configuration from LedgerClientConfiguration

Fixes #12391

The channel configuration now has to be provided separately from the
configuration specific to the ledger client. In this way we avoid
situations where the builder is provided with some configuration
that gets overridden.

changelog_begin
[Scala bindings] The channel configuration has been split from the
LedgerClientConfiguration class. Provide the gRPC channel specific
configuration separately or use a builder. The channel configuration
no longer overrides the builder.
changelog_end

* Fix compilation issues in //ledger-service/...
2022-01-18 10:03:33 +00:00