* hide unreferenced circe encoders
* derive an extractor-compatible lf-value-json codec
* replace circe bespoke LedgerValue enc with lf-value-json-based enc
* mixed up the encoder's string settings (boolean blindness)
* match tests to new labelless record encoding
* match tests to new Optional format, no Some/None tag
* match tests to new Map format, no Map tag
* make other extractor encoders coherent with lf-value-json formats
* remove unused circe encoders
* stray unused variable
* release note
* fix#3087's release note formatting; move SQL Extractor note down
* move SQL Extractor note down
* add Numeric.java
* ledger-api: rename `decimal` field to `numeric` in value protobuf
* Address Gerolf's comment
* ledger-api: add missing renammings
* ledger-api: relax syntax of numbers that can be sent as numerics
* extractor: fix
* leger-api: change format of number though ledger api
* daml-lf: fix numeric regexp
* ledger: fix tests
* Minimum changes to reuse extractor as library
* Make Writer independent of Target so that Target can be sealed.
* treat writerExtractor as a sort of pseudo-typeclass
* New acceptance test tool prototype
* Fix transaction filter helper
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432
Moreover, creates specific helpers for test DAML code.
* Move helpers from session to context
Remove a circular dependency between session and context, and limits the
usage of implicits.
* Run tests with ledgers out of process
* Prepare for drop in
* Temporary timeout increase
* Move bulk of the logic to the test runner
* Have a map of tests for CLI integration
* Timeout per-test, runner uses context, renaming
* Allow usage of time service, integrate semantic tests
* Integrate CLI SSL configuration
* Integrate failure expectation CLI option
* Integrate with failure output verbosity CLI option
* Integrate with test listing and picking CLI options
* Integrate with timeout scaling CLI option
* Integrate with command TTL CLI option
* Review CODEOWNERS
* Drop previously unimplemented CLI parameters
* Expand test todo list to encompass latest additions
* Deduplicate some testing infrastructure, swap in new test tool
* Remove unused rule
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290
* WIP
* Make gRPC thread factory spawn non-deamon threads
* Remove debug prints, complete divulgence test (missing assertion messages)
* Try to detect assertion failure line number
* Add Sandbox binary that starts an ephemeral postgres instance
This allows us to use the client_server_test bazel macro to run against
the sandbox backed by postgres.
Fixes#1543
* Add Sandbox binary that starts an ephemeral postgres instance
This allows us to use the client_server_test bazel macro to run against
the sandbox backed by postgres.
Fixes#1543
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695
* Remove TlsConfiguration duplicate, move original to commons
* Make assertion more readable
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Fix build errors introduced in previous commit
- exclude time service tests from reference-v2
- add copyright header to TlsConfiguration
* Complete divulgence test and address review comments
Restores comments from original divulgence tests and strives to be as
close to them as possible.
- Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169
- Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156
- Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913
* Delete old divulgence tests
* Restore methods to fetch contracts by template identifier
* Run conformance tests on in-memory sandbox
* Run conformance tests on the persistent sandbox
* Remove workflow identifier workaround
* New contract keys test (#2452)
* Set channel type for LedgerSession
* Add ContractKeysIT
* Run tests against reference-server v2
* Removed the old ContractKeysIT. However, ...
... I cannot remove ContractKeysChecks completely, because we have
another test path for DARs created prior to DAML-LF 1.6, which doesn't
have the submitter == maintainer restriction for contract keys.
* Use codegen instead of custom code
* Add missing copyright headers
* Drop sandbox conformance test suite (seems to not work on Windows CI)
* Make time simpler
* Test tool tests to run only semantic tests
* Make CI behave more consistently
* Add missing files to run tests on Postrgres
* Fix flaky divulgence test, introduce readable identifiers
* Increase sandbox conformance tests timeout
* Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246
* Reintroduce test resource extraction
* Read semantic tests from the classpath rather than Bazel
* Use codegen types for ContractKeys integration test
allocateParty returns Primitive.Party and create and exercise also
accept Primitive.Party. This way we don't have to keep a String and
Primitive.Party representation around.
* Bump timeout for sandbox conformance tests
* Remove dependency on Bazel runfiles
* new data-scalacheck library for ImmArray, FrontStack, et al
* add checkLaws functions as library to data-scalacheck
* make checkLaws more configurable at use points
This is a breaking change on the ledger api. So far we could rely on the
assumption that contractId == eventId. This assumption doesn't hold
anymore in a daml-on-x setting, where the eventId is created by the
api server, but the absolute contractId is created by the ledger
implementation.
Instead of going through weird contortions to store the relevant data in
the existing database schema, it is more viable in the long term to
remove that field and instead provide facilities to lookup transactions
by contractId.
Contributes to #2068.
* lf-encoder: minor fix for let expression
* extractor: add test for enum types
* navigator: a small test for enum type
* daml-lf: create value version 5 for enums
* formatting
* daml-lf: fix version timeline
* extractor: fix enum support
Test that a 51MiB DAML module crashes the extractor when set to 50MiB
max, then that it succeeds at 60MiB. The module's source code is
generated in bazel shelling out.
This costs about a minute of build time to generate (20s) and compile
(40s) the module alone; it will be reduced by lowering the bracket in a
later PR. See #1551 for more.
* generate "code" for VeryLargeArchive and compile to dar
* test cases for failing and succeeding based on inbound size threshold
* proper assertions in the failure case
* separate PG instance for each VeryLargeArchiveSpec test
* comment on the size choices
50MiB is no longer hard-coded on extractor, navigator input for sandbox
or any other server, permitting large packages; e.g. pass
--ledger-api-inbound-message-size-max 62914560 to extractor or navigator
to get a 60MiB limit.
Fixes#1463.
* extractor: --ledger-api-inbound-message-size-max option replaces 50MiB hard-coded [package size] limit
* navigator: make inbound buffer size configurable in navigator backend
* _actually_ change the max inbound size, scalafmt
* release note for --ledger-api-inbound-message-size-max option
* another release note for --ledger-api-inbound-message-size-max option
* Improving logging, adding scala-logging, #1502
check-enabled calls were missing for a lot of trace calls.
scala-logging relies on macros, so string concatenation won't happen.
* Release notes
* Drop support for DAML-LF 1.3 from damlc
This means `damlc` now only supports versions allowing arbitrary expressions
as contract keys. This is very helpful for the upcoming new template
de/re-sugaring underpinning generic templates.
* Unpin a few DAML-LF target versions in tests
* Fix golden tests
* Adapt changelog to rebase
* Rename DAML-LF scenario tests to 1.dev
* Update tests to --target 1.dev
* Fix release notes
* Addressing comments from the previous PR, adding more test cases
Either.cond and TemplateConfig implements Ordered
* Addressing comments from the previous PR
* trivial commit to kick azure pipeline to life
* backout trivial commit that failed copyright check
* Addressing comments from the previous PR
using scalaz laws to validate TemplateConfig ordering,
redesigning tests to rely on OnAnd[TemplateConfig, List] where we need
non-empty list of TemplateConfigs
* Add support for optional `--templates` configuration, #1352
template configs can be passed in the format:
`--templates <module1>:<entity1>,<module2>:<entity2>`
if no templates passed, use `Filters.defaultInstance`,
which means subscribe for all templates
* TemplateConfigs is a Set now
converting set to a sorted list, when validating previous startup params
so we have a deterministic order of template configs.
* Adding test case for template filtering and logging
Test fails: Template filtration is not supported on GetTransactionTrees
RPC. To get filtered data, use the GetTransactions RPC
Some refactoring will follow.
* Proper template ID filtering, more tests
have to convert Identifier to tuple
* Updating release notes.
* Replacing filter-map chain with collect
The extractor --party option may now specify multiple parties, separated
by commas; e.g. instead of --party Bob you can say --party Bob,Bar,Baz
and get the contracts for all three parties in the database.
Fixes#1353.
* refactor figuring the TransactionFilter to give to API
* replace ExtractorConfig#party with parties
* adjust remainder of extractor main code to handle multiple parties
* previous extractor tests pass
* factor dar production for extractor tests
* configureExtractor to change ExtractorConfig elements
* test that party-set extracts the inclusive union of visible contracts (and only that)
* release note for extractor multi-party support
* test faithfulness of --party splitting, including with spaces
* remove unused mixins from MultiPartySpec
* update --party's help text regarding multiple parties
* report malformed party errors at extractor cmdline option parse time
* stub away the components of LedgerValue
* rewrite v1 api converters to produce transaction Value ADT
* a needless 'case'
* shortcut methods for ImmArraySeq and tests
* porting extractor's JSON encoders to transaction Value
- JSON object ordering now matches record field order, instead of being
its reverse
- Includes a new encoding for records missing labels, to a list of
2-tuples
* porting extractor main transaction Value
- JSON date/time is just <num>s since epoch, maybe revisit
* adapt to Decimal newtype
* use daml-lf/data stringification for decimals in JSON
* snap aliases for Cid-less LedgerValue subtypes
* snap aliases for Cid-containing LedgerValue subtypes
* remove needless indirection
* test new missing-label Record JSON encoding
* write ImmArray traverse with syntax extension
* remove RecordField; move Name parsing to former RecordField converter
* daml-lf: make Decimal type safe
* daml-lf: create Utf8String type
* daml-lf: cleanup in data package
* Address Stephen Comments
* daml-lf: remove UTF8String
* Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.
HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.
* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event
Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).
Fixes#960.
Also move Interface and InterfaceType out of the reader subpackage; they
belong with the rest of the data model at the iface root.
The specific mechanics of reading a Dar all the way to producing an
EnvironmentInterface are left to Scala codegen's Codegen and Java
codegen's CodeGenRunner; there's no consensus or great stability on the
best way to tie these pieces together, but all the pieces might as well
be available in the interface library at least.
Inspired by a query on Slack by @leonelag regarding reading the
codegen-relevant parts of dalfs and dars; thanks!
* daml-lf: move EnvironmentInterface to interface library from Scala codegen
* daml-lf: move Interface out of reader subpackage
* language-support/java: deal with moving Interface out of reader subpackage
* document Interface and EnvironmentInterface
* missed copyright header in reader package.scala
* extractor: deal with moving Interface out of reader subpackage
* navigator: deal with moving Interface out of reader subpackage
* Add buildifier targets.
The tool allows to check and format BUILD files in the repo.
To check if files are well formatted, run:
bazel run //:buildifier
To fix badly-formatted files run:
bazel run //:buildifier-fix
* Cleanup dade-copyright-headers formatting.
* Fix dade-copyright-headers on files with just the copyright.
* Run buildifier automatically on CI via 'fmt.sh'.
* Reformat all BUILD files with buildifier.
Excludes autogenerated Bazel files.