Other changes:
- Fix ErrorCodeDocumentationGeneratorSpec not being in any bazel target.
- (partially) Fix inconsistent usage of deprecated, Deprecation and DeprecatedDocs annotation.
CHANGELOG_BEGIN
CHANGELOG_END
* [Self-service error codes] Do not return error code id in metadata
CHANGELOG_BEGIN
CHANGELOG_END
* Do not propagate definite_answer
* Additionally, remove redundant context info from error codes
* Fix tests
* Create IndexDbException as a specialization
* Used to globally define error codes returned by the persistence layer
that are logging
* Add a guard when exercising by interface.
This fixes part of #11703, when exercising an inherited choice by
interface and you know the template id, via the command preprocessor.
It does this by inserting a "guard" in between the interface fetch and
the exercise body. The guard is a function Interface -> Bool, which
is general enough to check the template id, without complicating too
much in speedy. And can be generalized in the future to check more,
like signatories, etc.
I added the guard as an optional argument to UExerciseByInterface.
This isn't hooked up to the protobuf AST yet (or Haskell side for
that matter) -- but I'll do it in the next PR! For now you can invoke
the guarded exercise via the command preprocessor, so I can enable the
approprate engine tests. (There's still some failing fetch tests left,
but I decided to leave this for later. Fetch can be a lot simpler than
guarded choices, since you always add a fetch node. No need for fancy
continuations.)
changelog_begin
changelog_end
* scalafmt
* Feedback and fix matches
* Update comments, we are always going to abort the transaction
* Raise WronglyTypedContract in SBGuardTemplateId.
* rebase and fix parser
* restore ANF
* scalafmt
changelog_begin
kvutils - For duplicate command rejections, the submission id of the already accepted transaction is returning as part of the gRPC metadata. The submission id will be included under the key `existing_submission_id`.
changelog_end
* Refactoring for Canton compatibility on PackageServiceErrors
* ErrorResource.all is public for accessibility from Canton
CHANGELOG_BEGIN
CHANGELOG_END
* Keep PackageServiceError object
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
* Adapted migration guide to include changes from https://github.com/digital-asset/daml/pull/11686
CHANGELOG_BEGIN
CHANGELOG_END
* Enriched migration guide with Sandbox-classic changed gRPC error codes
* Added migration guide for error codes changed in KV committer
* Extract the KV and Sandbox-classic migration guides
* Hierarchical order of error codes docs
* Added back full grpc error code description to columns
* Using "gRPC status code" instead of "gRPC error code"
* Addressed review comments from Hubert
* Apply suggestions from code review
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
* Addressed review comments
* Use 'Error codes' instead of 'Self-service error codes'
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
* Republish error codes generator libraries
* Additionally, add kvutils to classpath for generating KVErrors docs
CHANGELOG_BEGIN
CHANGELOG_END
* Use a new annotation (DeprecatedDocs) instead of @deprecated
* Needed for adding descriptions to the error groups docs. Needed for allowing cross-compilation
to 2.12 and 2.13, not possible due to the reflections machinery of extracting
the message from @deprecated
* Use error validators in ApiPackageManagementService
CHANGELOG_BEGIN
CHANGELOG_END
* Exclude PackageManagementServiceIT from compatibility tests after 1.17
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
[ledger-api] - Return max_deduplication_duration as part of the metadata sent with the gRPC status for commands rejected because of invalid deduplication periods
CHANGELOG_END
* 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
CHANGELOG_BEGIN
[ledger-api] - Return FAILED_PRECONDITION gRPC status code, instead of INVALID_ARGUMENT, for an invalid command deduplication duration
CHANGELOG_END
* DbDispatcher handles transient and non-transient SQL exceptions with specific error codes
CHANGELOG_BEGIN
CHANGELOG_END
* Handle retries when verifying ledger id
* Addressed Pawel's comments
* Logging clean-up and small refactoring
* Exhaustive match against Oracle and PSQL exceptions
* KV: port V2 errors to self-service errors framework
CHANGELOG_BEGIN
CHANGELOG_END
* Fix ConversionsSpec compiling
* Use a valid ID for ValidationFailure
* Fix error details in Conversions
* Relax and simplify checks in KeyValueConsumptionSpec
* Fix formatting
* Fix definite answer in deduplication v2
* Try and make Scala 2.12 happy
* Fix typos in comments
* Use NOT_FOUND for unknown parties and provide them as resources
* Race (group) -> SubmissionRaces
* Don't deprecate resource exhausted (ABORTED) error
* Rename KVCompletionErrors group into KVErrors (ResourceExhausted can be synchronous)
* Remove unneeded braces
Co-authored-by: Hubert Slojewski <hubert.slojewski@digitalasset.com>
* Move toJsonString to where it's used
* Deprecate InvalidLedgerTime
* Embed deprecation comments into annotation
* Change deprecation messages so that they make more sense in the docs
* Move deprecated errors to a dedicated group as proposed by @tudor-da
Co-authored-by: Hubert Slojewski <hubert.slojewski@digitalasset.com>
* [DPP-417][DPP-613] Adopt self-service error codes ApiTransactionService
CHANGELOG_BEGIN
CHANGELOG_END
* TV review
* TV review
* Uses ErrorFactories
* Error loggers use enriched logging contexts
* Deleted ApiTransactionServiceSpec
* Add TODO wrt to CommandValidation.invalidArgument
* Adapt transactionNotFound error assertions in conformance tests
* ErrorFactories.invalidArgumentWasNotFound for handling invalid event ids
* Revert improvement to TransactionNotFound cause message since
Canton still outputs the old message and assertions fail.
Co-authored-by: Tudor Voicu <tudor.voicu@digitalasset.com>
* [Self-service error codes] Implement V2 in Authorizer
CHANGELOG_BEGIN
CHANGELOG_END
* Added unit test for authorize (non-streamed)
* Fix after rebase
* Do not expose the error codes switching mechanism to the Java bindings
* Adjust InternalAuthorizationError to be SystemInternalAssumptionViolated
* Parameter names in test
* Testing AuthorizationInterceptor with regard to returned error codes
* Do not use default error code version switchers at instance creation
* Addressed Pawel's review comments
* Using ErrorFactories for error dispatching
* Pass loggingContext to Authorizer where available
* Generic internal authorization error
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
* Moved ErrorCodesVersionSwitcher to //ledger/error
CHANGELOG_BEGIN
CHANGELOG_END
* Rename ErrorCodeLoggingContext to ContextualizedErrorLogger
* Refactored ErrorFactories
* All error factories use ContextualizedErrorLogger for being able to dispatch self-service error codes.
* The ContextualizedErrorLogger is passed down from the dispatching Ledger API services.
* ErrorFactoriesSpec asserts both legacy (V1) and self-service error codes (V2).
* Adapted ApiSubmissionService
* Addressed Marcin's review comments
* [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