Commit Graph

841 Commits

Author SHA1 Message Date
Simon Maxen
75f7dadf9d
Update Metering Helper in line with spec changes [DPP-904] (#13007)
* Switch metering command line aruments to day from ISO time

* New metering json layout

changelog_begin
changelog_end
2022-02-22 11:14:56 +00:00
Simon Maxen
507494e768
Support for final metering reports [DPP-819] (#12973)
Metering reports may now be final

changelog_begin
Metering reports may now be final
changelog_end
2022-02-21 15:43:39 +00:00
Marton Nagy
9d831ff122
[User management] Some cleanup to ongoing-stream-authorization [DPP-830] (#12851)
changelog_begin
changelog_end
2022-02-17 15:35:41 +01:00
Stefano Baghino
01ddb48d94
Add tests and refactor package reference decoding (#12982)
Specifically for the Java codegen, builds on top of #12977.

Makes sure we don't rely on PackageName.fromString and PackageVersion.fromString
to blow up when passed an empty string.

changelog_begin
changelog_end
2022-02-17 13:28:13 +01:00
Moritz Kiefer
ca6167e673
Fix parsing of java codegen module prefixes (#12977)
* Fix parsing of java codegen module prefixes

I admit I have no idea what I thought when I wrote that split but it
was clearly nothing sensible.

changelog_begin

- [Java Codegen] Fix parsing of `module-prefixes` to support package
  names containing dashes.

changelog_end

* reveiw comments

* Inline nameVersion

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-17 09:29:43 +00:00
nicu-da
55fef9cf6a
[ledger-api] - Rename max deduplication time to max deduplication duration [KVL-1311] (#12939)
changelog_begin
ledger-api - rename ledger configuration max_deduplication_time to max_deduplication_duration
changelog_end
2022-02-15 21:14:26 +01:00
Moritz Kiefer
6ed6ea36e8
Drop parties from daml templates (#12953)
Complements #12952 which drops it from create-daml-app by also
dropping it from the rest.

Couldn’t find any docs or other stuff that is broken by this.

changelog_begin
changelog_end
2022-02-15 17:21:32 +00: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
Simon Maxen
e56676e871
Minimal change needed to support is_final proto update (#12917)
changelog_begin
changelog_end

Breaks-Protobuf: true
2022-02-14 16:45:09 +00:00
Moritz Kiefer
8e32842f57
Switch docs for upgrade automation to Canton Sandbox (#12908)
changelog_begin
changelog_end
2022-02-14 14:08:32 +00:00
Victor Peter Rouven Müller
c0c40bd10f
Add autoformatting to ts bindings & navigator frontend (#12693)
* Add autoformatting for the ts&tsx files (typescript effectively)

changelog_begin
changelog_end

* Format ts files

* Fix ts linter warnings
2022-02-11 11:44:52 +00:00
Stefano Baghino
781a63f435
Return a wrapper CreateUserResponse type for the Java bindings (#12816)
changelog_begin
[Java bindings] The wrapper type `CreateUserResponse` is now returned when
creating a user instead of the `User` type itself
changelog_end
2022-02-08 16:05:56 +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
Moritz Kiefer
22165730bf
Migrate Haskell tests to Sandbox on X (#12761)
* Migrate Haskell tests to Sandbox on X

The diff here looks extremely confusing. sandbox-classic is now
sandbox on x not sandbox classic so this isn’t a typo. It is really
moving to sandbox on x.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-07 21:18:16 +01:00
Moritz Kiefer
01d827b7c4
Enable java_conversions in scalapb (#12784)
* Enable java_conversions in scalapb

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-07 14:57:57 +00: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
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
Victor Peter Rouven Müller
aa45f48798
Upgrade to Scala 2.13.8 (#12506)
* Upgrade to Scala 2.13.8

changelog_begin
changelog_end

* Update hash for scala in nixpkgs

* update more hashes for scala upgrade

* Fix most warnings etc.

* Fix remaining errors etc.

* Fix formatting

* Resolve last errors hopefully

* Fix ledger api common build file

* Combine imports & revert accidental change that broke the CI run

* Rename exporting vals to scriptExport & minimize diff

* Remove more wrong changes

* moved warning around
2022-02-03 09:05:31 +00:00
Moisés Ackerman
e4764cc426
Upgrade to GHC 9.0.2 (#12300)
changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-01 11:27:11 +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
pbatko-da
c72c27c967
[User management] Terminate ongoing streams when user state has changed [DPP-830] (#12437)
CHANGELOG_BEGIN
Ledger API Specification: When using user management based authorization streams will now get aborted on authenticated user's rights change.
CHANGELOG_END
2022-01-28 16:44:39 +01:00
Robin Krom
0610a44524
daml-react: add an useUser hook (#12622)
We add a `useUser` hook to daml-react returning the user currently
logged in the ledger participant. create-daml-app is changed
accordingly.

CHANGELOG_BEGIN
[daml-react] A `useUser` react hook is added to the daml-react
TypeScript library. It allows for easy access to the currently logged in
user of a ledger participant node for ledgers supporting user
management.
CHANGELOG_END
2022-01-27 19:21:59 +01:00
Victor Peter Rouven Müller
6b902fdaaf
[TS-Bindings] Complete support for user management (#12576)
* Add ts bindings for the uncovered new user management endpoints

changelog_begin

- [Typescript Bindings] All methods for user management have been added to the bindings (createUser, deleteUser, getUser, listUsers, listUserRights, grantUserRight, revokeUserRight)

changelog_end

* Fix list user rights method & add tests

* Reduce diff

* Add missing delete method

* Update language-support/ts/daml-ledger/index.ts

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-26 16:49:00 +00:00
Stefano Baghino
0579ebdd77
Mark the withExpectedLedgerId method in DamlLedgerClient.Builder as deprecated (#12537)
changelog_begin
[Java bindings] Deprecate `DamlLedgerClient.Builder.withExpectedLedgerId`
changelog_end
2022-01-26 14:48:00 +01:00
Remy
5cdf9b95fb
Remove some unecessary implictly with Factory (#12559)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 13:28:26 +00:00
pbatko-da
42d86acd06
[User management] Disabling user management in auth when user management feature is disabled [DPP-827] (#12503)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-25 09:55:37 +01:00
Stefano Baghino
f1cd4b1c7c
Remove dependencies on compatibility libraries (#12548)
Continues the work started in https://github.com/digital-asset/daml/pull/12543

These libraries were only needed to transition from Scala 2.12 to 2.13
and are no longer useful as all the necessary items are now available
in Scala 2.13.

changelog_begin
changelog_end
2022-01-24 18:04:07 +00:00
Moisés Ackerman
dcd721da99
Drop scenarios (#12484)
* Remove scenarios from user examples

* Remove scenarios from tests

* implicitly enable scenario service for doctests

changelog_begin
changelog_end
2022-01-24 18:42:42 +01:00
Simon Maxen
8fa54c67ce
Experimental daml assistant support for metering report [DPP-816] (#12485)
* Add experimental Daml assistant support for ledger metering

CHANGELOG_BEGIN
Add experimental Daml assistant support for ledger metering
CHANGELOG_END

* Update with review comments

* Update with review comments
2022-01-24 16:11:59 +00: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
Stefano Baghino
93cfe043f8
Remove from the Java bindings constructors that were deprecated since 0.x (#12536)
changelog_begin
[Java bindings] `DamlLedgerClient.forLedgerIdAndHost` and `DamlLedgerClient.forHostWithLedgerIdDiscovery` static methods
and the constructor taking a `ManagedChannel`, which were all deprecated since 0.13.38, have been removed.
changelog_end
2022-01-24 14:43:01 +00:00
Moritz Kiefer
24b2325d19
Bump node-fetch to address dependabot alerts (#12553)
changelog_begin
changelog_end
2022-01-24 13:23:52 +00:00
Sofia Faro
3c8a6468fb
Tell users to use --install-assistant=yes (#12507)
* Tell users to use --install-assistant=yes

`daml install --activate` is deprecated since forever, we tell
users to use `daml install --install-assistant=yes` instead.

changelog_begin
changelog_end

* modernise error message somewhat

* add 'current'
2022-01-20 13:59:53 +00:00
Moritz Kiefer
b11f11bde0
Drop support for no seeding in sandbox-classic (#12495)
* Drop support for no seeding in sandbox-classic

Sandbox classic is going away in SDK 2.0 and so is support for v0
contract ids which is the only thing no seeding was used for.

This has been cleared by product.

I’ll drop v0 contract ids completely in #12464 as a follow-up. Just
wanted to factor this out for ease of review.

changelog_begin
changelog_end

* .

* .
2022-01-20 09:15:13 +01:00
mziolekda
82534f9155
Remove the reset service from the ledger api and the documentation [DPP-804] (#12472)
* Remove reset service from grpc and documentation [DPP-804]

CHANGELOG_BEGIN
Remove reset service from the ledger api protocol and the documentation
CHANGELOG_END

* remove reset service from two left-over places

* remove reset service from the protobuf structure test
2022-01-19 14:46:50 +01:00
Moritz Kiefer
f07791e580
Upgrade typescript and typedoc (#12457)
Typedoc has a peer dep on typescript so we need to bump both.

changelog_begin
changelog_end
2022-01-18 15:52:39 +01:00
Simon Meier
2640bc6ab7
user management: require appropriate scope in user access tokens (#12428)
* user management: require `daml_ledger_api` scope in user access tokens

The accesss token's scope must include `daml_ledger_api` to ensure
that access token was issued for accessing the Daml ledger api.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-18 13:01:47 +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
Stefano Baghino
69a8b6797e
Fix reported vulnerabilities (#12443)
changelog_begin
changelog_end

Bump resolved markdown-it version to 12.3.2 for modernizr

Bump webpack-dev-server to 4.3.7 to fix transitive issue reported on selfsigned 1.x

Bump marked to 4.0.10 to address reported vulnerability
2022-01-17 17:55:01 +00:00
Stefano Baghino
98c9461b72
Remove usages of Flowable.fromFuture and Single.fromFuture (#12425)
Fixes #12913

The resulting `Flowable`/`Single` is going to be blocking.

Since the `Future` is ultimately a `ListenableFuture`, we take advantage of the
possibility of adding a callback to it and we dispacth it to the execution
sequencer that is used to process response streams.

changelog_begin
[Java bindings] The Single resulting from calling several of the services
exposed by the bindings are no longer blocking. For further details, see
https://github.com/digital-asset/daml/issues/12193.
changelog_end
2022-01-17 17:21:28 +01:00
dependabot[bot]
6d6b433d0a
Bump shelljs from 0.8.4 to 0.8.5 in /language-support/ts/packages (#12426)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-17 08:59:07 +00:00
Moritz Kiefer
ce624915d5
Fix damlc warnings & compile flags (#12404)
`--ghc-option=-Werror` turns warnings into errors, `--ghc-option=-Wwarn`
undoes exactly that so this clearly was not doing anything sensible.

changelog_begin
changelog_end
2022-01-13 18:32:31 +00:00
Stefano Baghino
9cc2a6ed49
Support UserManagementService on the Java bindings (#12403)
* Support UserManagementService on the Java bindings

changelog_begin
[Java bindings] User management service client added
changelog_end

Fixes #12401

* Apply suggestions from code review

Thanks @S11001001

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-13 17:28:17 +00:00
akshayshirahatti-da
1193f5dd47
Changes to disable multiplexing for websockets (#12384)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-13 09:12:09 +01:00
Victor Peter Rouven Müller
886d058628
[TS-Bindings] Add support for get user which recently has been added to the json api (#12271)
* Add support for get user which recently has been added to the json api

changelog_begin

- [TS-Bindings] You can now call getUser to gain information about
    the user that is associated with the currently used JWT.

changelog_end

* Apply review comments
2022-01-07 11:21:22 +00:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Moisés Ackerman
ba0c6c9841
Set --enable-scenarios to False by default (#12156)
* Set --enable-scenarios to False by default

changelog_begin
changelog_end

* Enable scenarios for shake test

* Add --enable-scenarios=yes for //compiler/lsp-tests

* Add enable_scenarios arg to rules_daml/daml.bzl helpers

* daml_compile
* daml_build_test
* daml_test

* Add enable_scenarios to ledger/test-common helper da_scala_dar_resources_library

* Add --enable-scenarios=yes for //ledger/test-common

* Remove unused scenario in //ledger/test-common PingPong test

* Add --enable-scenarios=yes for //daml-lf/tests

* Add --enable-scenarios=yes for //language-support/java tests

* Add --enable-scenarios=yes for group-chat example

* Add --enable-scenarios for //ledger/sandbox-perf LargeTransaction test

* Add --enable-scenarios=yes for //docs tests

* Add --enable-scenarios=yes for //daml-lf/scenario-interpreter tests

* format bazel

* Add --enable-scenario=yes for 'daml_doc_test's

* Add --enable-scenarios=yes for DamlDocTestIntegration

* Add --enable-scenarios=yes for DamlcTest

* Add --enable-scenarios=yes for Test/DataDependencies

* Add --enable-scenarios=yes for daml-ghc-deterministic.sh

* Add --enable-scenarios=yes for Test.IncrementalBuilds

* Add --enable-scenarios=yes for tests:memory-bond-trading and tests:memory-examples

* Add --enable-scenarios=yes for daml-assistant/integratio-tests
2021-12-20 19:31:06 +01:00
Stefano Baghino
42adfdc857
Get rid of deprecated components (#12167)
* Get rid of deprecated components

Removes:
- mentions of the Node.js bindings
- mentions of the Scala bindings
- usage of the Scala codegen as an SDK tool
- Java bindings "reactive components"

changelog_begin
The Node.js bindings are no longer supported as part of the Daml SDK
The Scala bindings are no longer supported as part of the Daml SDK
The Java bindings reactive components are no longer supported as part of the Daml SDK
The `daml codegen` command has dropped support for Scala
changelog_end

* Fix typo noticed by @cocreature

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Address https://github.com/digital-asset/daml/pull/12167#issuecomment-995714093

* Remove quickstart-scala from the SDK tarballs

* Fix failing codegen test

* Address https://github.com/digital-asset/daml/pull/12167#pullrequestreview-833991243

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-16 16:55:19 +00:00