Commit Graph

1040 Commits

Author SHA1 Message Date
Bernhard Elsner
78a0677fb1
Fix command in triggers docs (#12123)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-13 15:35:33 +01:00
Bernhard Elsner
9ff8851488
Fix a docs display issue with Safari and Firefox (#12035)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-13 13:25:00 +01:00
pbatko-da
25ae69eb01
[DPP-657] Make error codes docs nicer (#12079)
Changes:
1. Limit local table of contents depth in HTML view.
2. Move some subsections higher up in the hierarchy.
3. Move error categories inventory right before error codes inventory.

CHANGELOG_BEGIN
CHANGELOG_END
2021-12-10 17:24:27 +01:00
pbatko-da
99091db18c
[DPP-771][Error codes] Add readme.md and supplement docs with a concrete error handling example. (#11990)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 13:09:21 +01:00
Bernhard Elsner
80768427d0
Add Java and database compatibility docs. (#11979)
* Add Java and database compatibility docs.
CHANGELOG_BEGIN
CHANGELOG_END
* Update the versions we test on to match reality
2021-12-06 12:15:33 +00:00
Moisés Ackerman
0b79d8ae7c
Deprecate 'controller ... can' syntax (#11363)
Closes #11317

* Add warning for uses of 'controller ... can' syntax

* Remove uses of 'controller ... can' syntax

* Add test cases for -W{,no-}controller-can

* Update docs to reflect 'controller ... can' syntax deprecation

changelog_begin
* Deprecate 'controller ... can' syntax.
  * It will be removed in a future version of Daml.
  * Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
2021-12-01 13:36:04 +01:00
pbatko-da
5641948410
[Docs] Add labels to error codes to support references to them (#11913)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 14:30:58 +01:00
Andreas Lochbihler
5a9481f9d8
unify heading markup according to README.md (#11919)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 11:32:09 +01:00
Andreas Lochbihler
49e5d415f6
align index.rst files for HTML and PDF (#11907)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-29 14:48:20 +01:00
Moritz Kiefer
31cc540cf9
Turn package name & version warnings into an error (#11859)
* Turn package name & version warnings into an error

fixes #11321

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-26 18:46:33 +00:00
Remy
58e69ade1a
LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
the more consistent, as asked by Moritz in review of #11820

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 12:23:17 +00:00
pbatko-da
c27406cdcf
[DPP-762][Self-service error codes] Automate generation of inventory of error categories. #11879
Other changes:
- Fix ErrorCodeDocumentationGeneratorSpec not being in any bazel target.
- (partially) Fix inconsistent usage of deprecated, Deprecation and DeprecatedDocs annotation.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 10:22:14 +01:00
Sofia Faro
2f8f69e7cb
Drop DA.Next.Set and DA.Next.Map (#11864)
* Drop DA.Next.Set and DA.Next.Map

Fixes #11527. Also removed a bunch of unnecessary CPP, though there's
still a lot more CPP to remove.

changelog_begin

- [Daml Standard Library] DA.Next.Map and DA.Next.Set have been removed
  after being deprecated since Daml-LF 1.11

changelog_end

* Drop a deriving MapKey

* update unstable-types test
2021-11-25 13:02:08 +00:00
pbatko-da
5f3a4d2067
[Self-service error codes] Fix section numbering in pdf for error codes section by moving it a level higher. (#11867)
Also make section header markers consistent docs' reamde.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 13:46:12 +01:00
pbatko-da
066da4f30c
[Self-service error codes] Small fixes for docs/scripts/live-preview.sh (#11856)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 19:23:06 +01:00
Stefano Baghino
258fb65d1c
Document how to deal with HTTP JSON API schema changes (#11336)
* Document how to deal with HTTP JSON API schema changes

changelog_begin
[HTTP JSON API] [Docs] Document lack of data continuity guarantees and how to deal with schema changes
changelog_end

Furthermore: uses HTTP JSON API instead of HTTP-JSON API consistently,
drops the capitalization of query store in the documentation and fixes
hyphening in a few places

* Fix title markup
2021-11-24 18:05:30 +00:00
pbatko-da
9461702309
[DPP-673][Self-service error codes] Split one narrow migration table into multiple narrower ones to fit in the generated pdf's pages. (#11803)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 17:38:31 +01:00
pbatko-da
55191847cd
[DPP-673][Self-service error-codes] Generate error code directory compatible with both pdf and html docs (#11794)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 15:30:48 +01:00
Stephen Compall
e6c8229594
port #11798 documentation changes to json-api HTTP codes documentation (#11823)
- see c4b6a17da1

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 13:16:46 +00:00
tudor-da
c4b6a17da1
[Self-service error codes] Update existing error code references [DPP-593] (#11798)
* Updated Ledger API services protobuf definitions

CHANGELOG_BEGIN
CHANGELOG_END

* Adapted Building Applications / Ledger API / gRPC section

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Small rewording Error codes page

* Updated outdated LedgerAPI / gRPC page

* Apply suggestions from code review

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Updated outdated LedgerAPI / gRPC page

* Addressed review comments

* Addressed review comments

* Remove unnecessary link to error-codes

* `Ledger API` changed to `Common Ledger API change`

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-22 18:39:25 +00:00
Moritz Kiefer
addb2edc03
Drop Scala 2.13 version guards from Bazel definitions (#11819)
changelog_begin
changelog_end
2021-11-22 17:37:49 +00:00
tudor-da
8e31e8e6a8
[Self-service error codes] Enabled by default [DPP-691] (#11685)
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)

CHANGELOG_BEGIN
[Ledger API Specification] The Ledger API returns enriched error codes (see https://docs.daml.com/error-codes/self-service/index.html)
For backwards-compatibility, a new API flag `--use-pre-1.18-error-codes` is introduced for preserving the legacy behavior for
clients that want to migrate incrementally to the changed gRPC status code responses and error details format.
CHANGELOG_END

* Adapted HttpServiceIntegrationTest

* Renamed `Feature Flag` to `Configuration` in docs

* Fix Daml Script tests

changelog_begin
changelog_end

* Fix Repl functests

changelog_begin
changelog_end

* Fix haskell binding tests

changelog_begin
changelog_end

* Fix CommandClientIT test

* Fixed Sandbox and CommandServiceBackpressureIT tests
 Please enter the commit message for your changes. Lines starting

* Adapt //compiler/damlc/tests:repl-functests again

* Fix more tests and address Miklos' comments
* Flag name changed to `grpc-status-codes-compatibility-mode`

* Remove useless flags sandbox-classic

* Sandbox-classic tests fix for ContractKeysIT and ExceptionsIT
* Created 2 deprecated test suites that have the more generic assertions as returned
by the deprecated in-memory backend

* More fixes for CommandServiceIT
* Fixes compilation issue with the deprecated exceptionsIT class for Sandbox-classic in-memory

* Compatibility mode for old test tools

* Change flag name to `use-pre-1.18-error-codes`

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-22 12:26:48 +00:00
pbatko-da
2e789ddf37
[DPP-417][Self-service error codes][Docs] Add more complete information for forking gRPC status codes. (#11739)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 17:03:10 +01:00
Miklos
4106222ab8
Fix docs regarding deduplication periods [KVL-1194] (#11738)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 11:45:01 +01:00
tudor-da
b0a1bf79df
More missing error codes (#11749)
* Missing error codes in Sandbox classic

CHANGELOG_BEGIN
CHANGELOG_END

* Covering more errors above the persistence layer

* Fix wrong contextualizedErrorLoggers

* Compilation fixes
2021-11-18 10:00:43 +00:00
Stephen Compall
7e4acf97fc
link to doc detailing gRPC-to-HTTP code mapping (#11742)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-17 15:44:08 +00:00
tudor-da
a05a40aeec
[Self-service error codes] Adapt ResetService in Sandbox classic (#11731)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-17 11:11:54 +01:00
pbatko-da
122a4ccd0d
[DPP-417][Self-service error codes][Docs] Mention that correlation id is usually submission id. (#11728)
CHANGELOG_BEGING
CHANGELOG_END
2021-11-17 08:07:44 +00:00
mziolekda
ccbf714078
expand the text about errors in the log [DPP-755] (#11723)
* expand the text about errors in the log

* scrap the entire logging section
2021-11-16 22:21:35 +00:00
tudor-da
fbc436d70a
[DPP-739][Self-service error codes] Adapt QueueBackedTracker error codes (#11719)
* [Self-service error codes] Adapt QueueBasedTracker

CHANGELOG_BEGIN
CHANGELOG_END

* Added changed error codes to migration guide

* Fixed ErrorFactoriesSpec

* Update ledger/error/src/main/scala/com/daml/error/definitions/LedgerApiErrors.scala

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: Pawel Batko <pawel.batko@digitalasset.com>
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-16 22:21:29 +00:00
pbatko-da
07cff7cdb7
[DPP-417][Self-service error-codes] Document error categories. (#11727)
* [Self-service error-codes] Docs intro WIP

* CHANGELOG_BEGIN
CHANGELOG_END

* 1

* Fix rst

CHANGELOG_BEGIN
CHANGELOG_END

* [DPP-417][Self-service error-codes] Document error categories.

CHANGELOG_BEGIN
CHANGELOG_END

* 1

* Fix
2021-11-16 22:55:35 +01:00
tudor-da
c1f4beb328
Ledger ID mismatch does not change error codes. (#11720)
* Remains NOT_FOUND

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-16 17:05:09 +00:00
pbatko-da
a29fee925c
[Self-service error-codes] Add introductory section to self-service error codes page. (#11712) 2021-11-16 16:41:41 +01:00
tudor-da
05f604d672
[Self-service error codes] Enrich migration guide [DPP-755] (#11711)
* 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>
2021-11-16 14:25:53 +00:00
tudor-da
ec6d7cc3db
[Self-service error codes] Error code definitions revisiting [DPP-675] (#11686)
* Error definitions revisiting and hierarchical grouping refactoring

CHANGELOG_BEGIN
CHANGELOG_END

* Full hierarchical path for error grouping

* Addressed Pawel's review comments

* Apply suggestions from code review

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

* Do not strip margin in error code explanations

* Revert changing LEDGER_ID_MISMATCH from NOT_FOUND to FAILED_PRECONDITION

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-15 21:28:13 +00:00
pbatko-da
81e24504d4
[DDP-596][Self-service error codes] Add migration guide (#11632)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-12 10:07:37 +01:00
Stephen Compall
22d916baed
party-set arguments for JSON API (#11454)
* add actAs, readAs to `meta` for create, exercise, createAndExercise endpoints

* use meta actAs, readAs to control how contract IDs are looked up for exercise

* outdated comments on JwtWritePayload and JwtPayload

* toSet1 operator to clean up some NEL manipulation

* take optional readAs argument for query endpoint

* use readAs for query POST

* check whether readAs is safe in query endpoint

* missed CommandMeta args in tests

* FetchRequest, a domain model to layer on "fetch" endpoint's ContractLocator

- ContractLocator was overloaded as a domain request model *and* a component
  of other domain request models; the addition of new arguments means it can
  no longer exactly meet the former, and adding "readAs" to it would poison it
  for the latter cases.

* take readAs argument from fetch endpoint

* add readAs security check from query to fetch

* move jwt parties functions to util

* testing the party-set/JWT functions

* missing headers

* caught boolean blindness in readAs security checks

* test that meta params are used for commands

* make resolveRefParties do a subset check, too

* Revert "make resolveRefParties do a subset check, too"

This reverts commit 40a66f102c.

* test that the readAs auth check actually applies

* test that command service uses meta readAs, actAs

* note on test coverage

* add changelog

CHANGELOG_BEGIN
- [JSON API] ``actAs`` and ``readAs`` may be specified for create, exercise,
  create-and-exercise, non-WS fetch, and non-WS query.
  See `issue #11454 <https://github.com/digital-asset/daml/pull/11454>`__.
CHANGELOG_END

* no saving mallocs

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

* untabify

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* move design comment to comment from function name

- suggested by @cocreature; thanks

* remove unneeded variable

* refactor single-key callers of requestJsonReader

- suggested by @cocreature; thanks

* build error in ce

* diagnose Windows failure

* add missed http-json-testing requirement

* use readers as fetch/query party-set name

- suggested by @cocreature and @realvictorprm, thanks

* extra import

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-11-12 02:10:15 +00:00
Gary Verhaegen
f4689691ca
document helm chart (#11648)
CHANGELOG_BEGIN

* There is now an Early Access Helm chart to start all of the Connect components on a Kubernetes cluster.

CHANGELOG_END
2021-11-11 13:31:02 +01:00
Moritz Kiefer
3588284fad
Fix screenshots in daml intro 2 (#11617)
The screenshots use a different module name.

fixes #9644

changelog_begin
changelog_end
2021-11-09 18:44:43 +00:00
Gary Verhaegen
a3195fd62d
fix link to blog (#11570)
I'm not entirely sure that this is the intended link (v. say
`https://daml.com/blog`), but the current one is dead so presumably this
is better.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-08 10:38:37 +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
fabiotudone-da
214c7ab445
Self-service errors: generate groups documentation [KVL-1186] (#11526)
* Add groups information to JSON

CHANGELOG_BEGIN
CHANGELOG_END

* Code cleanup

* Fix docs generation

* Fix KVErrors group explanation string

* Render error group explanations in generated docs

* Fix ErrorCodeDocumentationGeneratorSpec
2021-11-04 12:07:29 +01:00
Stefano Baghino
6c45f099bb
Remove TODO (#11446)
Fixes #11425

changelog_begin
changelog_end
2021-10-28 11:11:07 +00:00
carrielaben-da
54c400a341
Update wording in Deploying to a generic Daml ledger (#11327)
* Update generic_ledger.rst

* Changelog

Additional wording changes for grammar and style.

CHANGELOG_BEGIN

CHANGELOG_END

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
2021-10-25 17:12:25 +00:00
Gerolf Seitz
ab8a863734
[docs] Add Daml Driver for VMBC to the commercial integrations section (#11360)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-22 15:44:11 +00:00
Moritz Kiefer
07ad3e0d9a
Suport multi-party readAs in triggers (#11299)
* Suport multi-party readAs in triggers

fixes #7640

This does not yet include the trigger service. We’ll tackle that separately.

changelog_begin

- [Daml Triggers] Triggers now support readAs parties. They can be
  specified via `--ledger-readas a,b,c`. As part of this change
  ``testRule`` gained an extra argument to specify the `readAs`
  parties. If you previously used

  ```
  testRule trigger party acsBuilder commandsInFlight s
  ```

  you now need to use

  ```
  testRule trigger party [] acsBuilder commandsInFlight s
  ```

changelog_end

* Update triggers/tests/src/test/scala/com/digitalasset/daml/lf/engine/trigger/test/AbstractFuncTests.scala

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-10-20 18:17:15 +00:00
Moritz Kiefer
728296575b
Fix component status for triggers (#11311)
changelog_begin
changelog_end
2021-10-20 15:28:13 +02: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
Stephen Compall
f4df1cc4d0
converting server errors to proper client errors (#11184)
* a model for trapping client errors in Scala bindings shim and reporting correctly

* clean up some nesting with an alias

* filter out client-side command service errors

* fix flattening error propagation of CommandService errors in endpoints

* remove todo

* Daml evaluation triggers INVALID_ARGUMENT; handle this for creates/exercises

* clean up lookupResult

* remove stripLeft utility; it is unused

* proper error propagation for /parties endpoint

* map grpc status codes to HTTP error codes

* add a case to pass-through gRPC errors in Endpoints errors

* handle gRPC status in all explicit top-level catches

* pass through gRPC errors in CommandService as well

* treat a gRPC status anywhere in the causal chain as indicating participant-server error

* propagate ContractsService errors without assuming they will always be ServerErrors

* filter ServerErrors' contents when rendering errorful streams

* log errors from websocket output instead of rendering full messages

* hide message in ServerError case

* remove Aborted

* transfer with bad contract ID now returns 409

* mention new error codes

* add changelog

CHANGELOG_BEGIN
- [JSON API] Several kinds of gRPC server errors are now reported with
  associated HTTP statuses; for example, a Daml-LF interpreter error now
  returns a 400 instead of a 500, and an exercise on an archived contract
  returns a 409 Conflict instead of a 500.  Errors internal to JSON API
  (e.g. internal assertion failures) are no longer detailed in the HTTP
  response; their details are only logged.
  See `issue #11184 <https://github.com/digital-asset/daml/pull/11184>`__.
CHANGELOG_END

* remove unused Show and liftErr utility

* adapt daml-script to new error codes

* adapt typescript tests to new error codes

* adapt json-api failure tests to new error codes
2021-10-19 13:54:29 -04:00
Stefano Baghino
9ed1eb3ce3
Address security notice on ansi-regex (#11243)
* Address security notice on `ansi-regex`

Addressed this via resolution of `chalk` on a common version
which seems close enough to other old versions not to break
anything (tested manually) while removing the `ansi-regex`
transitive dependency that causes our daily builds to break.

Also removed `package-lock.json` since we are using `yarn`.

changelog_begin
changelog_end
2021-10-14 11:15:34 +00:00