Commit Graph

11052 Commits

Author SHA1 Message Date
Claudio Bley
e766f91338
Generate CSV file from all test evidences for ledger client components (#15372)
* Add new security categories

* Use test-security framework for OAuth2 middleware

* Regenerate `security-evidence.md`

* Explicitely exit the test-evidence generator

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Add //ledger-service/http-json:integration-tests-lib to evidence generator

* Skip maven artefacts on the classpath

The checker framework artefact (`checker-2.5.4.jar`) causes an `IllegalAccessError` when included in the runpath:
```
Exception in thread "main" java.lang.IllegalAccessError: class com.sun.tools.javac.code.Scope$ImportScope$ImportEntry cannot access its superclass com.sun.tools.javac.code.Scope$Entry (com.sun.tools.javac.code.Scope$ImportScope$ImportEntry is in unnamed module of loader java.net.URLClassLoader @31000e60; com.sun.tools.javac.code.Scope$Entry is in module jdk.compiler of loader app)
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at org.scalatest.tools.SuiteDiscoveryHelper$.isDiscoverableSuite(SuiteDiscoveryHelper.scala:204)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processClassName(SuiteDiscoveryHelper.scala:243)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$processFileNames$1(SuiteDiscoveryHelper.scala:279)
	at scala.collection.Iterator$$anon$9.next(Iterator.scala:577)
	at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:474)
	at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:576)
	at scala.collection.immutable.List.prependedAll(List.scala:152)
	at scala.collection.immutable.List$.from(List.scala:684)
	at scala.collection.immutable.List$.from(List.scala:681)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:35)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:32)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.IterableOnceExtensionMethods$.toIterable$extension(IterableOnce.scala:178)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processFileNames(SuiteDiscoveryHelper.scala:285)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$discoverSuiteNames$1(SuiteDiscoveryHelper.scala:132)
	at scala.collection.immutable.List.map(List.scala:250)
```

* Regenerate `security-evidence.md`

* Convert remaining TEST_EVIDENCE stanzas of HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Print warning when a test suite could not be loaded

* Fix typo

* Use test-security framework for HTTP JSON

* Read files in tests lazily

The test-evidence generator tool needs to instantiate scalatest test suites in order
to access the tagged tests and collect relavant test entries.

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for trigger service

* Use structural type to call `in` and `ignore` for different classes

* Remove Authentication category from EvidenceSecurity tool

There are no TEST_EVIDENCE annotations anymore.

* Add required trigger-runner-lib


* Import `scala.language.reflectiveCalls` where it is needed

* Remove left-over comments

* Add `test_evidence_binary` scala binary rule

This rule is a customized `scala_binary` rule which also accepts a `tests` attr and
generates a runpath file which is later consumed by scalatest to detect the relevant
scalatest test suites.

* Process test suites, add transitive deps

* Support nested tests_suites in `test_evidence_binary`

* Remove debug print's

* Add missing dependencies to test-evidence:generator

* Abort if test suites cannot be loaded

* Cleanup

* Reinstate scalacopts in http-json

* Reword the test description to not drop information

* Fix typo

* Explicitly exit the JVM on exceptions

This is required since non-daemon threads also prevent JVM shutdown when an exception was thrown.

* Format test-evidence/BUILD.bazel

* Resolve file paths lazily

This avoids a `NullPointerException` on Windows where Runfiles.rlocation returns `null`.

* Document new Security properties

* Print target directory and file name

* Clarify test descriptions

* Replace duplicate Security properties

Co-authored-by: Stephen Compall <stephen.compall@daml.com>Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-29 12:35:22 +01:00
azure-pipelines[bot]
bd09bc08db
bump canton to 20221128 (#15722)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-29 11:19:34 +01:00
Raymond Roestenburg (Actually RayRoestenburg)
272e50acdd
Initial custom views documentation. (#15721)
* Initial custom views documentation.

* Update docs/source/app-dev/custom-views/index.rst

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

* Update docs/source/app-dev/custom-views/index.rst

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

* Minor change for closer rendering of ``Batch``es.

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-28 21:23:55 +00:00
Gary Verhaegen
f6a5838039
docs: remove redundant toc (#15718) 2022-11-28 20:08:29 +01:00
Gary Verhaegen
76d65f51ea
fix node 18 again (other issue) (#15717)
It looks like, at least on some machnes, recent Node versions will not
resove localhost to 127.0.0.1 anymore.

There wasn't really a good reason for us going through DNS resolution
for these anyway, so here's a simple fix. Hopefully.
2022-11-28 20:04:33 +01:00
mziolekda
4c1600a6e6
bump ledger api version to 2.2 (#15713)
* bump ledger api version to 2.2

* Update document link
2022-11-28 17:20:45 +01:00
tudor-da
5bef9d81c6
Update missing Optional/Required proto docs for Commands/CreatedEvent (#15710)
changelog_begin
changelog_end
2022-11-28 14:03:27 +01:00
pbatko-da
8b7978fe44
[DPP-1327] Migration tests for upcoming ETQ changes and support for Oracle (#15694) 2022-11-28 13:54:43 +01:00
Gary Verhaegen
e8e9f5dc36
fix gsg on node 18 (#15373)
CHANGELOG_BEGIN
CHANGELOG_END
2022-11-28 11:52:47 +01:00
Remy
462044bd93
[LF] add language version to scala StablePackage list (#15640)
fixes #11371
2022-11-28 10:42:21 +01:00
Matteo Limberto
12ff9dc0bf
Update Daml Finance quickstart (#15709) 2022-11-28 09:31:09 +00:00
nickchapman-da
6e379dbd5a
[script] update doc for daml-script/interfaces (#15683)
* update reference doc (doc-comments in Script.daml) for daml-script/interfaces

* small english fixes

* update user doc and example for daml-script/interfaces

* build/test ScriptExample.daml at 1.15

* dont show party in interface info message

* fix for: //daml-script/export/integration-tests/golden:matches-docs-test

* disable failing integration test
2022-11-28 08:18:44 +00:00
azure-pipelines[bot]
d20fb143f1
bump canton to 20221125 (#15708)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-27 16:32:59 +01:00
tudor-da
330c772850
Read driver_metadata for transaction trees as well (#15702)
* Read driver_metadata for transaction trees as well

changelog_begin
changelog_end

* Test contract metadata in StorageBackendTestsTransactionStreamsEvents
2022-11-25 20:56:07 +01:00
Carl Pulley
5d62deeda6
Reduce trigger INFO logging noise 2022-11-25 17:48:23 +00:00
Carl Pulley
898d8cbf88
Quick fixes to stablise trigger behaviour (#15700)
CHANGELOG_BEGIN
* [Triggers] Revert changes for in-flight rate limit controls
CHANGELOG_END
2022-11-25 14:00:44 +01:00
pbatko-da
d3ed3c8118
[DPP-1327] Put SoX's default config under version control (#15671) 2022-11-25 12:48:34 +00:00
azure-pipelines[bot]
9952e6011c
bump canton to 20221124 (#15698)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-25 08:59:38 +01:00
Gary Verhaegen
b749828b43
update & pin puppeteer dependencies for gsg test (#15584)
Not that I relish the added flakiness on CI, but I want to be able to
run those tests locally.
2022-11-25 00:23:56 +01:00
Oliver Seeliger
da67ee7066
LedgerClient admin pruning hook (#15679)
CHANGELOG_BEGIN
CHANGELOG_END
2022-11-24 20:35:33 +01:00
Gary Verhaegen
5f4beecccd
remove abandoned snapshots from LATEST (#15444)
I can't think of any reason to keep those around.
2022-11-24 17:21:53 +01:00
Brian Weir
ec94f7385b
Update finance daml yaml template (#15686) 2022-11-24 17:04:28 +01:00
Gary Verhaegen
46a4804672
bump nix (#15628)
Partly because the current version is from February (of this year,
fortunately), and partly because I need a more recent one to bump node
to 18 and fix the GSG for that.
2022-11-24 14:29:09 +00:00
Gary Verhaegen
65018bcd28
remove Victor's access to data bucket (#15629) 2022-11-24 14:47:37 +01:00
Gary Verhaegen
4f1fe79016
fix preview (#15675) 2022-11-24 14:43:28 +01:00
azure-pipelines[bot]
9fe6a1247a
bump canton to 20221123 (#15681)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-24 14:43:04 +01:00
Sergey Kisel
7760ec9fb3
IdentityProviderConfig persistence layer [DPP-1331] (#15634) 2022-11-24 13:32:42 +01:00
mziolekda
fd8439144a
fix eta-expansion and nullary method warnings [DPP-1281] (#15689)
* Fix flake jwt leeway test

* fix eta-expansion warnings

* fix nullary method errors

* Revert "Fix flake jwt leeway test"

This reverts commit 5e2fed648b.

* format
2022-11-24 12:28:41 +00:00
Remy
752b4cfb63
[Doc] update configuration of Interface (#15690) 2022-11-24 12:06:02 +00:00
mziolekda
a02c30440a
remove deprecated warnings everywhere [DPP-1281] (#15661)
* remove deprecated warnings in /ledger

* update generated documentation
2022-11-24 12:05:08 +00:00
Carl Pulley
36c93bfaa6
Add throttle and rate-limit documentation for triggers
* fixes #15676

CHANGELOG_BEGIN
CHANGELOG_END
2022-11-24 12:03:34 +00:00
azure-pipelines[bot]
1ee7b18a55
update NOTICES file (#15682)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-24 12:57:05 +01:00
mziolekda
a2886dfd55
Fix flake jwt leeway test (#15688) 2022-11-24 11:08:19 +00:00
azure-pipelines[bot]
36137e77c7
rotate release duty after 2022-11-23
CHANGELOG_BEGIN
CHANGELOG_END
2022-11-24 10:11:09 +00:00
mziolekda
9a12bb8b67
Add ability to override the service pool size [DPP-1306] (#15653)
* Add ability to override the service pool size

* don't set the value in the reference.conf
2022-11-24 11:09:54 +01:00
mziolekda
9cee266479
Move jwt library to libs-scala (#15674) 2022-11-24 11:08:56 +01:00
Sergey Kisel
adabba574f
Support of the transaction rollback in case of Either.Left (#15655) 2022-11-23 19:27:31 +00:00
fayi-da
448c184258
Remove overloaded methods in command client (#15519)
* Remove overloaded methods in CommandClient

* Remove overloaded methods in CommandClient

* Revert destructive changes to command client

* Add config for command client methods

* Add stubs for new submit methods in CommandClient

* Formatting

* create() should be static

* Add sample deprecation

* params on builder methods don't need to be optional. Add some javadoc notes

* Add tests for submitAndWait

* Add tests for submitAndWait

* Add implementation for submitAndWaitFor* methods

* Update tests

* Refactor CommandSubmissionClient

* Deprecate overloaded methods in CommandClient

* Update deprecated method use

* Lint

* Cleanup deprecated use

* Update required params

* CommandClientConfig -> CommandsBuilder

* Formatting

* Rename CommandsBuilder -> CommandsSubmission

* Delete deprecated tests

* Rename withParty(String) -> withActAs(String)

* Formatting

* Refactor SubmitRequest.java

* Refactor SubmitRequest.java

* Refactor SubmitAndWaitRequest and SubmitCommandsRequest

* Move CommandsSubmission to the java-bindings package and refactor dependencies accordingly

* todos for horrible casting

* Update language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/CommandClientImplTest.scala

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

* make CommandsSubmission final

* e.t.c -> etc

* Remove use of singleton list for actAs

* Return unmodifiable lists in CommandsSubmission

* Cleanup SubmitCommandsRequest

* Formatting

* Update tests for SubmitCommandsRequest

* PR comments

* Use toCommands() in HasCommands

* Reorder constructor params

* Rename params and commandsSubmission -> submission

* Cleanup docs

* Update docs

* Update docs

* Cleanup test util

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-11-23 16:10:06 +01:00
Brian Weir
cbebd8675b
Quickstart enhancement (#15651) 2022-11-23 15:53:18 +01:00
Carl Pulley
28fc3606ea
Trigger rule logging
* fixes #15489

CHANGELOG_BEGIN
CHANGELOG_END
2022-11-23 10:02:17 +00:00
nickchapman-da
18025794f2
use Jspon API "fetch" endpoint for daml-script queryInterfaceContractId (#15652) 2022-11-23 09:27:49 +00:00
Luc Bourlier
ffc31ce371
Tweak on HTTP metrics (#15641)
Alignment with the gRPC metrics.

CHANGELOG_BEGIN
CHANGELOG_END
2022-11-23 09:37:41 +01:00
azure-pipelines[bot]
1a86b8df49
bump canton to 20221122 (#15666)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-23 08:45:33 +01:00
mziolekda
eed43036e8
Fix non exhaustive matches in /ledger [DPP-1281] (#15608)
* Fix non exhaustive matches in /ledger

* eliminate the use of nowarn

* fixes post review
2022-11-22 19:18:06 +01:00
Sergey Kisel
0db050457d
Removed potentially unused classes (#15622) 2022-11-22 18:25:19 +01:00
Stephen Compall
375fcb4a47
use syntax that can report inequality failure in Java codegen test (#15643) 2022-11-22 17:03:46 +00:00
Remy
8358aab22c
[Ledger-API] Stricter version of the ValueValidate (#15650)
that does not strip trailling 0 when validating Numeric
2022-11-22 17:45:14 +01:00
dylant-da
ff6e776da0
Improve type error for Numeric types with precision > 37 and mistyped/missing field access (#15626)
* point to GHC with improved error

* Point to new GHC

* Fix error in RelTimeDetailsHidden1

* Point to updated ghc

* Point to new GHC

* Satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END

* Fix assertion in RelTimeDetailsHidden1

* Amend tests with out-of-bounds NumericScale, point to updated GHC

* Drop quotes around type error

* Add tests for field access errors

* point to merged GHC
2022-11-22 15:44:25 +00:00
Stephen Compall
38079ea422
make packagePrefixes implicit in Java codegen (#15642)
* remove the package-prefix-free overload

* switch fullyQualifiedName, the basis, to a newtyped implicit

* remove unused packagePrefixes

* remove fullyQualifiedName indirection
2022-11-22 10:15:13 -05:00
Stephen Compall
51c3865701
use require for some argument checks instead of assert (#15646)
- suggested by @avdv in #15565; thanks
2022-11-22 10:13:59 -05:00