Commit Graph

10768 Commits

Author SHA1 Message Date
pbatko-da
971e4f09a4
[DPP-1278] Treat empty string displayName as lack of displayName on DB result parsing (#15238)
changelog_begin
changelog_end
2022-10-17 14:48:05 +02:00
Rex Ng
e724982a9e
Generalize the <?> operator to support a generic error type (#15244)
The original implementation forces the caller to always use Text as the error type. This is unnecessarily restrictive as the types can be polymorphic on the caller's side.

CHANGELOG_BEGIN
* [Stdlib] Generalize the (<?>) operator to support a generic type for Validation
CHANGELOG_END
2022-10-17 14:41:00 +02:00
mziolekda
4f08bedc17
Print all kinds of problems in hikari connection checker (#15248)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-17 11:13:41 +02:00
azure-pipelines[bot]
d3b1265288
bump canton to 20221014 (#15242)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-17 07:23:55 +02:00
azure-pipelines[bot]
2c4dac0d48
bump canton to 20221013 (#15239)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-14 09:21:36 +02:00
Carl Pulley
ef692ef76e
Ensure trigger test DAR models are built for multiple LF versions
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-13 18:14:18 +01:00
atriantafyllos-da
884ee930d4
Tag all the metrics in the daml sdk code (#15202)
Tag metrics in daml [DPP-1225].

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-13 15:51:55 +00:00
azure-pipelines[bot]
f64b3e5da8
update compat versions (2022-10-13) (#15229)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-13 17:43:57 +02:00
Remy
3622518ed6
[HS bindings] disable flaky tests (#15233)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-13 16:07:03 +02:00
Claudio Bley
e24497635d
Rework evidence security categories (#15226)
* Rework evidence security categories

using the 7 industry standard security testing areas:

* Authentication
* Authorization
* Confidentiality
* Integrity
* Availability
* Non-Repudiation
* Resilience

CHANGELOG_BEGIN
CHANGELOG_END

* Replace category `Input Validation`

* Replace category `Privacy`

* Replace category `Semantics`

* Replace category `Semantics`

* Replace category `Performance`

* Skip categories `NonRepudiation` and `Resilience` for now

There are currently no tests for these categories.

* Regenerate `security-evidence.md`
2022-10-13 09:55:45 +00:00
azure-pipelines[bot]
456cc959e8
bump canton to 20221012 (#15228)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-13 10:53:21 +02:00
pbatko-da
e766b5d333
[DPP-1219] Organize packages in participant-local-store Bazel package (#15206)
changelog_begin
changelog_end
2022-10-13 09:58:09 +02:00
Nicu Reut
4b503b7e8c
Upgrade the prometheus client version [PLEN-4] (#15211) 2022-10-13 07:07:45 +02:00
Chun Lok Ling
74dd242984
Typed ACS and transaction streams for Java codegen (#15159)
* added transactionFilter

* move transactionFilter to `TransactionFilter`

* fromCreatedEvent

* format

* added getTransaction with contract type companion

* ACS using contract type companion

* position

* add change log

CHANGELOG_BEGIN
CHANGELOG_END

* Ct

* Ct

* format

* better exception

* fixed test cases

* added java doc and rename method to GetContracts

* address Stephen's comments

* address Stephen's comments

* address Stephen's comments

* remove unused import

* format

* address Stephen's comments

* address Stephen's comments

* Make some codegen code to be java 8 compatible; Modify IouMain to use the new getActiveContracts. to address Stephen's comments

* use 1.11, no need to be java 8 compatible

* revert

* 11 not 1.11
2022-10-12 21:01:01 +01:00
carrielaben-da
a49dd9ed8c
Update initaccept.rst (#15218)
Addressing the missing word issue noticed by Craig, plus some additional improvements.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
2022-10-12 13:54:51 -04:00
azure-pipelines[bot]
71206050a7
rotate release duty after 2022-10-12 (#15219)
@S11001001 is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-12 13:52:40 -04:00
fayi-da
ae70c97390
Ensure interface generation uses package prefixes (#15215)
* Ensure interface generation uses package prefixes

CHANGELOG_BEGIN
- [BUGFIX] Interface generation now respects package prefixes argument. This means generated interfaces will now be placed in the right subpackages.
CHANGELOG_END

* Prove that we get an error if interface is generated in the wrong directory

Command: bazel build //language-support/java/codegen:test-daml-java.jar

Error:
bazel-out/darwin_arm64-opt/bin/language-support/java/codegen/_javac/test-daml-java.jar/libtest-daml-java.jar_tmp/blah/ut/retro/InterfaceRetro.java:24: error: cannot find symbol
  public static final ChoiceMetadata<ut.retro.InterfaceRetro, Transfer, ut.retro.InterfaceRetro.ContractId> CHOICE_Transfer =
                                             ^
  symbol:   class InterfaceRetro
  location: package ut.retro
bazel-out/darwin_arm64-opt/bin/language-support/java/codegen/_javac/test-daml-java.jar/libtest-daml-java.jar_tmp/blah/ut/retro/InterfaceRetro.java:24: error: package ut.retro.InterfaceRetro does not exist
  public static final ChoiceMetadata<ut.retro.InterfaceRetro, Transfer, ut.retro.InterfaceRetro.ContractId> CHOICE_Transfer =

* Revert "Prove that we get an error if interface is generated in the wrong directory"

This reverts commit cc8612a8a3.
2022-10-12 16:13:06 +00:00
Stephen Compall
d03ed9c66b
add missing PrimitiveValueDecoders (#15195)
* add List, Optional, ContractId, TextMap primitive decoders

CHANGELOG_BEGIN
CHANGELOG_END

* add fromNumeric and fromGenMap

* generate less code for list, optional

* allow newline in assignment

* generate less code for contract ID

* generate less code for textmap

* generate less code for genmap

* use fromNumeric

* extra test for an indirect case

* javadoc fromTextMap, fromGenMap, impossible

* example of building value decoders with derived combinators
2022-10-12 09:46:25 -04:00
pbatko-da
8ae52ae3fa
Fix auto-generated proto docs (blank lines break tables in html docs) [DPP-1233] (#15214)
changelog_begin
changelog_end
2022-10-12 13:51:15 +02:00
azure-pipelines[bot]
d3e3d110ce
bump canton to 20221011 (#15220)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-12 09:39:33 +00:00
tudor-da
500a1f2ab2
Clean-up unused methods in MutableCacheBackedContractStore (#15213)
changelog_begin
changelog_end
2022-10-12 07:55:43 +00:00
dylant-da
cedb09825a
Only report coverage for package-local choices/templates (#15150)
* Only report coverage for package-local choices/templates, add extra info

* Unify information for printTestCoverage

* Extract modules from all packages & local modules, not just tested ones

* Create reports about local/external choices/templates

* Remove unnecessary reporting

* Report local package coverage, external package coverage, all coverage

* Refactor printReport

* fix test, satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END

* Fix another test

* Fix wording to `defined in local/external package`

* Check coverage against all modules in scope, not just tested modules

* Fix wording again, back to local/external modules - more accurate

* Replace TemplateInfo with Qualified Template
2022-10-11 15:57:36 +00:00
atriantafyllos-da
ac8618aaed
Removed unused cache metrics [DPP-1246]. (#15149)
Removed unused cache metrics [DPP-1246].

CHANGELOG_BEGIN
The following metrics were removed from the metrics relevant to caches:
  - load_successes
  - load_failures
  - load_total_time
CHANGELOG_END
2022-10-11 16:39:56 +02:00
azure-pipelines[bot]
9affa377e5
rotate release duty after 2022-10-05 (#15164)
@garyverhaegen-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2022-10-11 15:35:10 +02:00
Stephen Compall
951817aee1
run query-store-independent tests less often (#15201)
* declare the separate kind of duplication

CHANGELOG_BEGIN
CHANGELOG_END

* move completely independent tests

* move many tests to 'QueryStoreIndependent'

* fix metering-report test to work with user tokens

* rename query-store/auth-dependent tests

- to QueryStoreAndAuthDependentIntegrationTest
- from AbstractHttpServiceIntegrationTestTokenIndependent

* security evidence moved
2022-10-11 09:27:07 -04:00
Stephen Compall
0d36c0ac17
javadocs for javaapi.data.codegen (#15209)
* link to #15207
* javadoc for ContractTypeCompanion and ChoiceMetadata
* link to #15208

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-11 09:26:28 -04:00
Marton Nagy
e5b173a9c4
Fix flaky test (#15205)
* Fix CommandServiceBackpressureIT by increasing load
* Make stage buffer size configurable (allows to limit the drain
effect of the heavily buffered pipeline)

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-11 15:20:21 +02:00
Gerolf Seitz
cc0ff448e0
Update rules_jvm_external to 4.4.2 (#15197)
rules_jvm_external 4.0 introduced the @maven//:outdated command, which
checks the dependencies for newer versions. This can help us keep the
dependency versions up-to-date.

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-11 12:49:43 +00:00
fayi-da
69f11311df
npm resolutions for daml extension (#15203)
* npm resolutions for daml extension

* Remove unnecessary dependencies

* No changelog

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-11 11:42:36 +00:00
Moisés Ackerman
7f19bf258a
Check package name of preprocessor-excepted modules (#15184)
* Ensure daml preprocessor is only skipped when building 'daml-{prim,stdlib}'

changelog_begin
changelog_end

* Test that the daml preprocessor can't be skipped simply by changing the module name
2022-10-11 12:11:36 +02:00
pbatko-da
80df42bfcb
[DPP-1239] Unify metadata related tests for party and user management services (#15104)
changelog_begin
changelog_end
2022-10-11 10:01:48 +02:00
azure-pipelines[bot]
ab62d1aebc
bump canton to 20221010 (#15210)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-11 06:43:48 +00:00
Nicu Reut
2f453a145c
Extract the testing metrics instance [PLEN-4] (#15192) 2022-10-10 18:52:49 +00:00
Carl Pulley
c710081ed3
Log Runner stream runtime exceptions at ERROR and with a stack trace
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-10 15:46:24 +01:00
nickchapman-da
490056ebf9
fix bug in pretty-print for empty kont-stack (#15179)
changelog_begin
changelog_end
2022-10-10 16:35:10 +02:00
Stephen Compall
70f118579c
remove some ResolvedQuery cases (#15000)
* introduce ForQuery to overload ActiveContract.fromLedgerApi
* remove booleans from ResolvedQuery.apply
* wrong error string
* use the fact that query is non-empty to hide the Empty case
* we definitely only need a Semigroup, which fixes the law violation
* remove Empty

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Chun Lok Ling <110462561+chunlokling-da@users.noreply.github.com>
2022-10-10 09:33:40 -04:00
Simon Maxen
c5cd904dba
Exclude zero counts from metering report (#15169)
changelog_begin
changelog_end
2022-10-10 13:45:05 +01:00
Simon Maxen
b9abbfdcbf
Allow the rate limiting interceptor to be passed to api services (#15190)
changelog_begin
changelog_end
2022-10-10 11:24:01 +01:00
azure-pipelines[bot]
3f3408f16f
bump canton to 20221007 (#15196)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-08 19:38:42 +02:00
fayi-da
d11704018a
Provide contract choice metadata (#15116)
* #13766 initial implementation of choice metadata for templates

* #13766 initial implementation of choice metadata for interfaces

* #13766 Add marker type to ContractTypeCompanion

* #13766 Minor type fix

* Cleanup after merge with main

* Temporary fix for package prefixes

* Format java files, rename Maker -> ContractType in ContractTypeCompanion

* Add documentation and tests

* Complete choice metadata implementation

CHANGELOG_BEGIN
- Add new representation of a choice, ChoiceMetadata.
- Generated templates and interfaces now include fields for each available choice. These fields will have a ChoiceMetadata type and will be called CHOICE_N, where N represents the choices' name.
CHANGELOG_END

* Update docs and cleanup tests
2022-10-07 20:54:43 +00:00
Stephen Compall
df2dd37735
mark parts of Java bindings final (#15173)
* mark several javaapi.data models final
* PrimitiveValueDecoders are final; utility classes should not be constructed
* replace Bool constructor with new #of static method

CHANGELOG_BEGIN
- [Java bindings] Many classes in the ``javaapi.data`` package that were
  *intended* to be ``final`` are now explicitly marked as such.
CHANGELOG_END
2022-10-07 18:04:03 +00:00
azure-pipelines[bot]
b7fccfc3b5
update NOTICES file (#15186)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-07 15:36:36 +02:00
azure-pipelines[bot]
9275fc0f57
bump canton to 20221006 (#15185)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-07 15:36:12 +02:00
Stephen Compall
7a85900e0c
update parse-url from 6.0.5 to 8.1.0 (#15183)
- CVE-2022-2900
- CVE-2022-3224

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-06 12:42:46 -04:00
nickchapman-da
4d5157b20e
remove dead code (#15181)
changelog_begin
changelog_end
2022-10-06 15:57:27 +00:00
nickchapman-da
ef959deeac
[engine] improve stacktrace for daml-script InterpretationError (#15178)
* improve stacktrace for daml-script InterpretationError

changelog_begin
changelog_end

* adapt expected regexp
2022-10-06 15:54:50 +00:00
atriantafyllos-da
fd38b652ec
Update caffeine to 3.0.5. (#15176)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-06 17:12:39 +02:00
Stephen Compall
10b5654aab
more Javadocs for codegen base library (#15171)
* javadoc DefinedDataType tree
* javadoc ContractWithKey
* javadoc ValueDecoder

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-06 14:33:34 +00:00
Stefano Baghino
32a6896ca7
Add link to support page (and indirectly to the support portal) (#15167)
* Add link to support page (and indirectly to the support portal)

changelog_begin
changelog_end

* Update docs/source/support/support.rst

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-10-06 10:03:10 +00:00
Moisés Ackerman
ccb7ef7167
Add HasField instances for DA.Stack.SrcLoc (#15163)
* Add HasField instances for DA.Stack.SrcLoc (#15142)

changelog_begin
[DA.Stack] The SrcLoc datatype now supports dot syntax for field access (#15142)
changelog_end

* Add daml-test-file SrcLocFields to test dot syntax on DA.Stack.SrcLoc

* Define 'HasField f SrcLoc t' instances using record syntax
2022-10-06 11:53:22 +02:00