Commit Graph

17 Commits

Author SHA1 Message Date
Hubert Slojewski
281de9ac2e
Publish daml-lf encoder, parser and error-test-lib [KVL-1424] (#13730) 2022-04-29 13:59:19 +02:00
pbatko-da
92e3e9e2df
Add unit tests for ErrorCode [DPP-799] (#13236)
changelog_begin
changelog_end
2022-03-14 12:38:23 +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
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
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
pbatko-da
f330ace261
[DPP-765] Follow-up to generic gRPC error handler (#12056)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-10 10:12:14 +01:00
pbatko-da
0613a712c9
[DPP-767] Add assertion for logged messages in ErrorFactoriesSpec (#11973)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 09:54:49 +01:00
Moritz Kiefer
fa7663148a
Drop 2.12 versioned_scala_deps (#11748)
I’ve kept the infrastructure for versioned_scala_deps around because
I’m optimistic and hope that eventually we’ll do another Scala upgrade.

changelog_begin
changelog_end
2021-11-17 22:13:08 +00:00
tudor-da
92dfcdeb24
[Self-service error codes] Use error validators in ApiPackageManagementService (#11575)
* Use error validators in ApiPackageManagementService

CHANGELOG_BEGIN
CHANGELOG_END

* Exclude PackageManagementServiceIT from compatibility tests after 1.17

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-09 21:54:26 +01:00
fabiotudone-da
08236012af
Self-service errors: generate error deprecation docs [KVL-1187] (#11539)
* Render error deprecation in generated docs

CHANGELOG_BEGIN
CHANGELOG_END

* Build export-error-codes-json-app with Scala 2.13 only

* Generate docs only with Scala 2.13

* Generate daml-on-sql docs only with Scala 2.13

* Split the error codes JSON generator off from the error lib

* Build all docs only with Scala 2.13
2021-11-05 01:23:38 +01:00
tudor-da
78735a8d27
Less logging on //docs:generate-error-codes-json (#11486)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 16:33:27 +00:00
fabiotudone-da
e91ced54f3
KV: generate self-service error docs [KVL-1148] (#11431)
* Differentiate committer deduplication error code

* Let error docs generator tolerate `deprecated`

* Generate error documentation for KV

CHANGELOG_BEGIN
- [Integration Kit] Document KV-specific self-service errors
CHANGELOG_END

* Cleanup ErrorCodeDocumentationGenerator

* Add test case for deprecated errors

* Improve ErrorCodeDocumentationGenerator.getAnnotations

* Fix test

* Factor annotationTypeName

* Fix formatting

* Use case class for annotations and deal with missing ones in convertToDocItem

* Improve cause wording for KV duplicate command self-service error

* Simplify error message

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-11-01 10:13:06 +00:00
pbatko-da
d3dad75d00
[DPP-592] Generate docs for self-service error codes. (#11129)
Adding `Daml Documentation >> Building applications >> "Self-Service Error Codes (Experimental)` section in the HTML documentation. 

The section is populated automatically with error code information retrieved from the classpath.
The process of generating documentation for error codes looks like this:
- first we find error codes information from the classpath,
- then we save it to a json file,
- then the json file is made available to a custom Sphinx extension,
- then the custom Sphinx extension generates documentation wherever we put a new custom Sphinx directive.

Try it out with
`./docs/scripts/live-preview.sh`
or
`./docs/scripts/preview.sh`


CHANGELOG_BEGIN
CHANGELOG_END
2021-10-20 08:47:54 +02:00
fabiotudone-da
04494136bd
Allow converting an error into a gRPC status [KVL-1142] (#11204)
* Allow converting an error into a gRPC status

CHANGELOG_BEGIN
CHANGELOG_END

* Add missing dependencies
2021-10-12 14:04:01 +00:00
tudor-da
578fe7f10b
[Self-service error codes] Refactored for Canton compatibility [DPP-614] (#11164)
* [Self-service error codes] Refactored for Canton integration
* Introduces ErrorCodeLoggingContext which is used to abstract away the logging tech stack

CHANGELOG_BEGIN
CHANGELOG_END

* Moved all error definitions in //ledger/error

* Formatting

* Docs and remove of implicit conversion to DamlErrorCodeLoggingContext

* Fix compilation issues

* Fix tests

* Addressed Pawel's review comments

* Addressed Robert's review comments
2021-10-12 11:29:28 +00:00
tudor-da
38227a8ed7
[Ledger API error codes] ErrorCode enrichments [DPP-591] (#10874)
* [Daml error codes API] Further implementations
* Implements ErrorCode.asGrpcError (and test)
* Error code logging now accepts correlation id and an extra context map
* Full error context is included into enriched logging context

CHANGELOG_BEGIN
CHANGELOG_END

* Fixed Scala 2.12 compilation issues
2021-09-15 07:43:32 +02:00
tudor-da
97e14de644
[Ledger API error codes] ErrorCode interfaces and generator [DPP-591] (#10836)
* [Ledger API error codes] ErrorCode interfaces and generator
* Implementation of annotation processor
* Implementation of DocItem generator
* Unit testing of the generator and error code logging

CHANGELOG_BEGIN
CHANGELOG_END

* Addressed review comments
2021-09-14 13:50:00 +02:00