We filter heartbeat ticks until we get the first step message. This is
when starting from the ACS but it is incorrect when starting from an
existing offset where this results in us not emitting heartbeats until
we get the first step message. This PR fixes this by passing along the
initial offset and adds a test for this.
changelog_begin
- [Json Api] Fix a bug where heartbeating on websocket connections did not start until the first transaction was received when resuming from a previous ledger offset. See https://github.com/digital-asset/daml/issues/9102
changelog_end
fixes#9102
* Build SDK EE tarball
This sets up the infrastructure to build an SDK EE tarball and allows
for swapping out all files included in the tarball depending on the
edition. As an example, this includes the JSON API with (partial)
Oracle support in the EE tarball.
This PR does not yet address publishing this artifact to Artifactory.
I’ll tackle that in a separate PR.
changelog_begin
changelog_end
* Build in temp dir because Windows is stupid
changelog_begin
changelog_end
* directories are bad
changelog_begin
changelog_end
* Navigator resources are actually needed
changelog_begin
changelog_end
* Do not require a JWT token for Health and Reflection services
CHANGELOG_BEGIN
- A JWT token is no longer required to call methods of Health and Reflection services
CHANGELOG_END
* Let service's authorizer decide about rejections
* Updated authorization test
* Added integration test for unsecured authorisation test for the Health service
* Added integration test for unsecured authorisation test for the Server Reflection service
* Updated Claims doc comments
* Minor change
* Reduced code duplication with SecuredServiceCallAuthTests and UnsecuredServiceCallAuthTests
* Added copyrights
* Move response status handling logic to Authorizer
The tests start the stream in parallel to submitting commands. This is
problematic since it means that those commands can either be included
in the ACS block or they can come after the ACS block. This PR polls
for the ACS block upfront which makes sure that the commands come afterwards.
changelog_begin
changelog_end
improve previous generalization from #8695
- use lf version instead keyword (like 'stable', 'latest', 'dev') to
tag actual target. This will allow two keywords to map to the same
versions without doing twice the compilation/test work.
- use alias to map keywords tag target to versioned tag target.
- move package manage dar to test_commong.
CHANGELOG_BEGIN
CHANGELOG_END
* separate OracleQueries from PostgresQueries
- with some changes from 8161e63189 courtesy @cocreature
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* abstract BIGINT
* json, signatories, observers columns
* compatible lastOffset
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* oracle functions for select (single template ID), insert
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* add oracle branch to integration tests
* oracle CLI configuration for json-api
* run integration tests with ojdbc in classpath
* update maven_install for ojdbc
* drop table if exists for Oracle
* make create DDLs and drops more planned out; drop in reverse order for Oracle integrity
* repin maven
* port agreement_text
* port (by removal) array part of ledger offset update
* use CASE instead of JSON map lookup for multiparty offset update
* simplify self types
* fix contract archival
* repin
* remove selectContracts in favor of selectContractsMultiTemplate
* move Oracle test execution to separate build target
* move websocket test to itlib
* make a bad array instance for Oracle
* report actually-available JDBC drivers only
* configure Oracle test from CI
* attempt with platforms and constraints
* a mismash of bazel to get it to conditionally enable oracle testing
* fix dep resolution in Scala 2.13
* make the Oracle test a stub (inits and does empty DB query)
* remove commented unused deps
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* repin
* we never supply a value for the surrogate ID columns
- suggested by @cocreature; thanks
* add not null to json in DB-specific place
- suggested by @cocreature; thanks
* why DBContractKey
- suggested by @cocreature; thanks
* textType isn't finalized
- suggested by @cocreature; thanks
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
The jdkLogHandler provided by Doobie exists purely as an example and the library
itself does not recommend using it in production.
Note that this slightly changes the runtime behavior, logging successful queries
at debug level rather then info. The message itself is preserved from the original
MIT-licensed example.
This uses Slf4j as most of our components, instead of java.util.logging.
changelog_begin
[HTTP JSON API] The server now logs successful queries at debug level
instead of info
[Trigger Service] The server now logs successful queries at debug level
instead of info
changelog_end
* SupportedJdbcDriver box for the required DB-specific implicits and magic values
* replace postgres references with the SupportedJdbcDriver box
* explaining the typeclass
* labels for debugging
* allow external initialization of SupportedJdbcDriver, but not usage
* thread SupportedJdbcDriver everywhere, hang it off of ContractDao
* remove unused dep from integration tests
* split Queries into an agnostic part and a DB-specific part
* document withOptPrefix
* reformat
* SQL syntax more amenable to refactoring
* different sets of DDL for different backends
* make everything use queries passed around everywhere (usually via ContractDao)
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* group database queries while still providing the matchedQueries part of the event
* SQL query for multiquery websocket request all at once
* fetchAndPersist responds with a single bookmark
* unify connection imports
* convert DB results to domain, reassociate with proper query indices
* reassociate multiple matches with proper query indices
* make overlap more likely in testing overlap
* simpler matchedQueries merging for multi-query case
* integrate DB query with metadata-ful StreamQuery's
* expose daoAndFetch; better insertDeleteStepSource doc
* more efficient query path for contract key streams
* missed LogHandler
* persist resolved template IDs; glue the prefiltered set into the stream
* ticks and phantom removal need the state from the ACS
* compile SQL queries for query language predicates on WS
- wrong matchedQueries order
* harmonize order of ACS-vector and Positives
* misc compilation conversions
* WebsocketServicePostgresInt mixin
* update (C) date
* test websocket queries under postgres
* looking for new way to compile queries with proper matchedQueries offsets
* model that querying without matchedQueries requires only one SQL query
* SQL path for contract key streams
* nondeterminism
* fix 3 fetch tests with SQL syntax
* nondeterminism mk 2
* fix multi-party query tests by dealing with nondeterminism properly
* temp logs to track down the contract duplication
* match new scalafmt from #8437
* remove completed TODOs
* add changelog
CHANGELOG_BEGIN
- [JSON API] If the JDBC query store is enabled, it will be used to optimize
Websocket queries as well as the previously-supported synchronous queries.
See `issue #8226 <https://github.com/digital-asset/daml/pull/8226>`__.
CHANGELOG_END
* fix up matchedQueries indices
* complete the fast path for by-id queries
* remove AS c
- suggested by @cocreature; thanks
* remove temporary debugging logs
- suggested by @cocreature; thanks
* fix race condition in DB update when ACS has later contracts than the ledger-end
CHANGELOG_BEGIN
- [JSON API] Under rare conditions, a multi-template query backed by Postgres
could have mismatched snapshots of the ACS for different templates. These
conditions are now checked and accounted for.
See `issue #8226 <https://github.com/digital-asset/daml/pull/8226#issuecomment-756446537>`__.
CHANGELOG_END
* contractsFromOffsetIo already saves the offset to DB
* notes on why we rerun DB update to fix the race condition
* if the ACS last-offset exceeds the tx stream offset, save it in the DB instead
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.
As announced, this will be merged on Saturday to avoid too many conflicts.
changelog_begin
changelog_end
* Replace many occurrences of DAML with Daml
* Update docs logo
* A few more CLI occurrences
CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END
* Fix some over-eager replacements
* A few mor occurrences in md files
* Address comments in *.proto files
* Change case in comments and strings in .ts files
* Revert changes to frozen proto files
* Also revert LF 1.11
* Update get-daml.sh
* Update windows installer
* Include .py files
* Include comments in .daml files
* More instances in the assistant CLI
* some more help texts
* Support multi-party submissions in the JSON API
changelog_begin
- [JSON API] Add support for multi-party submissions by allowing for
multiple actAs parties in the token and passing on readAs to the
ledger.
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/EndpointsCompanion.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Upgrade Scala dependencies for 2.13 compatibility
This upgrades a bunch of Scala libraries to versions that have 2.13
support. There are two libraries that are still missing:
- diffson, this has a new version but with significant breaking
changes and it is only used in Naigator console which I hope to kill
before I have to worry about this.
- ai.x:diff, this is used in the ledger API test tool. The library is
abondened but there are a few alternatives.
changelog_begin
changelog_end
* Fix pureconfig
changelog_begin
changelog_end
* Fix Navigator
changelog_begin
changelog_end
This is necessary to at least attempt an upgrade to 2.13 and
generally, I want to keep our rulesets up2date. rules-scala forces the
version of scalatest so we have to bump that at the same time.
This requires changes to basically all Scala test suites since the
import structure has changed and a bunch of things (primarily
scalacheck support) got split out.
Apologies for the giant PR, I don’t see a way to keep it smaller.
changelog_begin
changelog_end
* mark some of dbbackend private
* fetchBy* functions for Queries
* shift in-memory filtering into the transaction stream
- removes irrelevant contracts from memory as soon as possible for fetch by
contract ID and key in-memory
* push the three synchronous search varieties into new signatures
* replace the core findByContract* functions with DB-delegating versions
* remove the GADT equality and most of the explicit traversals
- compiles again, finally
* factoring
* ContractDao wrappers for fetchById and fetchByKey
* DB version of findByContractId
* DB version of findByContractKey
* Search is the split of ContractsService
* fix SQL for keys
* trade the typeclass for a sum type
- sealed instead of final because of the path dependency on ContractsService
instance
* number conversion is done already in ContractDao
* make fetch-by-key tests depend on proper number conversion for SQL
* add changelog
CHANGELOG_BEGIN
- [JSON API] ``/v1/fetch`` now uses the Postgres database, if configured, to
look up contracts by ID or key, except when querying a contract by ID without
its corresponding template ID. The fallback in-memory version of
``/v1/fetch`` is also now significantly more efficient for large datasets,
though still linear.
You may optionally re-create JSON API's database to take full advantage.
See `issue #7993 <https://github.com/digital-asset/daml/pull/7993>`__.
CHANGELOG_END
* use search.search for search
- suggested by @cocreature; thanks
* add an index for contract key lookups
- suggested by @cocreature; thanks
* Upgrade akka-http to 10.2
Follow up to #8048, I left out this upgrade to reduce noise and since
I wasn’t quite sure how involved it was going to be.
changelog_begin
changelog_end
* Reenable transparent HEAD requests
Apparently no longer on by default but we depend on this in waitForHttpServer
changelog_begin
changelog_end
* Upgrade akka and akka-http
Was chasing an issue somewhere and thought this might affect it in
some way. It didn’t but I might as well turn the upgrade into a PR.
changelog_begin
changelog_end
* Fix trigger service tests
changelog_begin
changelog_end
* Downgrade akka-http again
changelog_begin
changelog_end
* Upgrade akka-http again and fix tests
changelog_begin
changelog_end
* Cleanup trigger service
changelog_begin
changelog_end
Previously we didn’t build up the `OneAnd[Set, Party]` properly and
included the one party in the set as well. This was an issue if you
have the same party multiple times, most likely in readAs and
actAs (but not limited to that). This then lead to SQL queries failing
since we tried to insert twice for a given party. This PR fixes that
by properly deduplicating the parties and adding a test for this.
changelog_begin
- [JSON API] Fix a regression introduced in SDK 1.7.0, where using a
party multiple times in the same JWT token (e.g., readAs and actAs)
broke database queries for that party. Note that there is never a
reason to include a party multiple times since actAs implies readAs.
changelog_end
* Make HealthService public
DABL patches the rest adapter so making this public helps them plug it
together with other things.
Also removes some garbage debug print which I forgot to remove
🤦
changelog_begin
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/HealthService.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* No logging
changelog_begin
changelog_end
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Add healthcheck endpoints to JSON API
This PR adds /livez and /readyz (following k8s naming scheme) that can
be used as liveness and readyness check. There isn’t much we can do
for liveness apart from showing that we can still respond to http
requests but readyness can be a bit more clever and check the ledger
connection as well as the database connection.
changelog_begin
- [JSON API] Add `/livez` and `/readyz` health check endpoints for
easier integration with k8s and other schedulers.
changelog_end
* I hate windows
changelog_begin
changelog_end
HTTP 1.1 exists since 1999 so there isn’t really a good reason not do
use this. In fact, the docs recommend to use Chunked in favor of
CloseDelimited.
changelog_begin
changelog_end
This PR extends the failure tests with one that establishes a
websocket connection, kills the connection and reenables it at the
last offset.
changelog_begin
changelog_end
The previous restriction was both too lax and too strict now that we
have multi pary queries:
1. It allowed a party in `readAs` for command submissions which just
fails on the ledger side. Changing this is technically breaking but
only if you used a token that would have been rejected as soon as you
enabled auth so that seems very resonable to break.
2. It didn’t allow extra parties in `readAs`.
This PR switches to requiring exactly one party in `actAs` while
supporting multiple parties in `readAs`.
changelog_begin
- [JSON API] JWTs on command submissions can now contain extra parties
in the `readAs` field. `actAs` is still limited to a single party.
changelog_end
* Add tests for connection failures in the JSON API
This PR adds some toxiproxy based tests to see how the JSON API reacts
if the connection to the ledger is killed. There are a bunch of
inconsistencies here in the tests some of which we might want to
address and the others we should at least document but I’ll leave that
for future PRs.
changelog_begin
changelog_end
* Import HttpServiceTestFixture instead of prefixing
changelog_begin
changelog_end
* set doobie version to 0.9.2 and rerun maven pin
* port extractor and some of JSON API
* repin maven
* use doobie's own builder compatibility where required
* use probably bad derivations to supply Blockers where transactEC was required
- The point of using Blocker instead of ExecutionContext seems to be to
especially emphasize to API users that it isn't appropriate to use an
ExecutionContext with ordinary behavior. That is what we have done, which
should probably change, but just compiling for now.
* fix fragment inspection test for internal restructuring
- This test depends on implementation details of Doobie, so naturally it must be
altered when that runs. Fortunately, it's been made easier by the changes
in this upgrade.
* allow 256 blockers for navigator transaction blocker, like the global EC
* allow as many blockers as the pool size for trigger service
- The transactor shouldn't share ExecutionContext for transactions with the
caller, so we set up a new one based on configured pool size.
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
This PR shuffles things around a bit to make it easier to test and
adds `--query-store-jdbc-config-env` which specifies the name of an
environment variable containing the jdbc URL. The UX for this is
modeled after #7660.
Added a test for the different formats.
fixes#7667
changelog_begin
- [JSON API] The JDBC url can now also be specified via
`--query-store-jdbc-config-env` which reads it from the given
environment variable.
changelog_end
* add silent_annotations option to da scala bazel functions
* use silent_annotations for several scala targets
* use silencer_plugin instead when the lib isn't used
* use silent_annotations for several more scala targets
* use silencer_lib for strange indirect requirement for running tests
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* silent_annotations support for scaladoc
* Support multi-party reads on the JSON API
Given that those aren’t going away and we’re instead doubling down on
this and adding multi-party writes as well, the JSON API needs to
support this. This PR only implements the read side (since the ledgers
do not yet support the write side).
This does not deviate from the approach chosen by the JSON API to
infer the parties from the token, we just don’t error out anymore when
more than one party is passed.
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Remove dependency on doobie_postgres from db-backend
changelog_begin
changelog_end
* Fix offset update
changelog_begin
changelog_end
* Use nonempty sets for parties
changelog_begin
changelog_end
* Fix updateOffset under concurrent transactions
changelog_begin
changelog_end
* Add tests for multi-party websocket queries and fetches
changelog_begin
changelog_end
* fmt
changelog_begin
changelog_end
* Fix perf tests
changelog_begin
changelog_end
* Cleanup
changelog_begin
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/dbbackend/ContractDao.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Move ParsePayload instances, thanks Stephen!
changelog_begin
changelog_end
* More unsubst
changelog_begin
changelog_end
* Fix off by 1 error
changelog_begin
changelog_end
* Remove redundant type annotation
changelog_begin
changelog_end
* fmt
changelog_begin
changelog_end
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
With the introduction of the standalone JAR, we cannot rely on the
assistant anymore to pass the default logback config. Users can still
override the logback config with `-Dlogback.configurationFile` if they
need something else but this provides a more sensible default logging
config than seeing a ton of debug logs from netty.
changelog_begin
changelog_end
This PR uses the new data structure introduced in #7220.
Additionnally this fix `Value Equal instance` which was considering
<a: x, b: y> different from <b:y, a:x>.
CHANGELOG_BEGIN
CHANGELOG_END
* Adding `uniqueModuleEntity`
and making sure that generated domain Template IDs do not
have module entity duplicates, so resolution should work
with no problem.
changelog_begin
changelog_end
* cleaning up
* Run gatling scenario from the perf runner main
reports are disabled for now, getting a class not found
when generating them
changelog_begin
changelog_end
There are two sources of flakiness and I’ve seen both on CI:
1. We can get more than one offset at the beginning if things are too
slow. This is addressed by just filtering those out.
2. The stream completes as soon as the input is closed. This is
addressed by keeping the stream open and closing it with `take`.
Point 2 is a problem for all tests, see #7293, but I’ll leave the
other tests for separate PRs (I’ve also never seen them flake).
You can observe the failures locally if you add a `Thread.sleep` between
creating the stream future and sending the commands.
changelog_begin
changelog_end
* ledger-api-client: `maxInboundMessageSize` -> `maxInboundMetadataSize`.
CHANGELOG_BEGIN
- [Scala Bindings] Rename a field in the ``LedgerClientConfiguration``
to ``maxInboundMetadataSize``, to match the builder Netty channel
builder. It was incorrectly named ``maxInboundMessageSize``, which is
a different channel property that configures the maximum message size,
not the header size.
CHANGELOG_END
* ledger-api-client: Introduce a `maxInboundMessageSize` config property.
We use this a lot; easier if it's in the configuration.
CHANGELOG_BEGIN
- [Scala Bindings] Replace the
``LedgerClientConfiguration.maxInboundMessageSize`` property with a
new one that represents the maximum size of the response body.
CHANGELOG_END
fix JSON API multikey stream
In the current state, the JSON API only handles multiple keys _from
different templates_. This makes it work for multiple keys from the same
template too.
Extracted from #7066 with the following changes:
- Use of a mutable `HashSet` to test for keys, because perf.
- Addition of a test at the JSON API level.
CHANGELOG_BEGIN
- [JSON API] Fix a bug where streaming multiple keys could silently
ignore some of the given keys.
CHANGELOG_END
* apply @cocreature's patch
https://gist.github.com/cocreature/d35367153a7331dc15cca4e5ea9098f0
* fix fmt
* reintroducing the main
* Introducing `ledger-service/http-json-testing`
* cleaning up
* Starting sandbox and json-api from perf-test main
changelog_begin
changelog_end
* Deprecate noop `--application-id`
changelog_begin
[JSON API]
Hiding and deprecating `--application-id` command-line option. JSON API never used it.
It is required to instantiate LedgerClientConfiguration and was not used for any command submission.
JSON API uses Application ID specified in the JWT. See #7162
changelog_end
* removing further usage of noop applicationId
* a bit of explanation what this is for
Apparently `[[]]` links don't work to external resources. I wanted to
turn the first referencee into a link too but that contains too many
weird characters.
CHANGELOG_BEGIN
CHANGELOG_END
* Adding `package-max-inbound-message-size`
this is to allow separate configuration settings for command submission
and package management ledger clients
* Fixing formatting
* Updating docs
changelog_begin
[JSON API] Adding `--package-max-inbound-message-size` command line option.
Optional max inbound message size in bytes used for uploading and downloading package updates. Defaults to the `max-inbound-message-size` setting.
changelog_end
* Addressing code review comments
* Introducing `TickTriggerOrStep` ADT, filtering out `TickTrigger`s preceding the initial ACS retrieval
changelog_begin
[JSON API] Filter out offset ticks preceding the ACS events block. See issue: #6940.
changelog_end
* Cleaning up a bit
* Do not emit offset tick unless we know the real offset
wait for LiveBegin message
* Make WebsocketConfig configurable
* Adding offset tick integration tests
reverting WebsocketService to 05d49b37c3 makes these tests fail
* cleaning up
* Refactoring `emitOffsetTicksAndFilterOutEmptySteps`
keep offset instead of StepAndError with offset
* factor --address, --http-port, --port-file options from http-json to cli-opts
- enabling reuse in trigger service
* use cli-opts for address and http-port options in Trigger service
* mark ServiceConfig and some defaults private
* use --address option to set up server
* document Setter
* test --address option is parsed
* missing (c) headers
* add changelog
CHANGELOG_BEGIN
- [Trigger Service] Accepts a new ``--address`` option to listen for HTTP connections on
interfaces other than localhost, such as ``0.0.0.0`` for all addresses.
See `issue #7090 <https://github.com/digital-asset/daml/pull/7090>`__.
CHANGELOG_END
* Moving `Statements.discard` from //ledger-server/http-json into //libs-scala/scala-utils
changelog_begin
changelog_end
* Add new module to the published artifacts
* `com.daml.scalautil` instead of `com.daml.scala.util`
@S11001001: That's because if this is in classpath and you import com.daml._,
you have a different scala in scope than the one you expect.
* daml-on-sql: Pull out a new `Main` object that wraps sandbox-classic.
CHANGELOG_BEGIN
CHANGELOG_END
* daml-on-sql: Fail if a JDBC URL is not provided or not for PostgreSQL.
* sandbox-classic: Rename the conformance test H2 database.
* daml-on-sql + sandbox-classic: Report configuration errors cleanly.
This means letting `ProgramResource` catch the errors, log, and exit.
* daml-on-sql: Change the name logged on startup.
* daml-on-sql: Change the default participant ID.
* sandbox-common: Give the ledger name its own tagged string type.
* sandbox-classic: Generate random ledger IDs using the ledger name.
* daml-on-sql: Remove the banner, replacing it with a blank line.
* daml-on-sql: Enable strong seeding by default.
And weak seeding in the conformance tests.
* sandbox-classic: Move the ledger name to a separate parameter.
It's not really configurable.
* sandbox-classic: Move LedgerName from sandbox-common.
* daml-on-sql: Remove "-participant" from the participant ID.
* daml-on-sql: Use `Name` where possible.
* daml-on-sql: Make the ledger ID mandatory.
* Revert "sandbox-classic: Move LedgerName from sandbox-common."
This reverts commit 0dad1584a7.
* daml-on-sql: Print "DAML-on-SQL" in the CLI help, not "Sandbox".
* daml-on-sql + sandbox + sandbox-classic: Split out custom CLI parsing. (#6846)
* participant-state: Simplify naming the seeding modes.
* sandbox-common: Move the ledgerIdMode up in the configuration.
* sandbox-classic: Move the configuration from sandbox-common.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix miscellaneous warnings caught by IntelliJ IDEA.
* set many extra scalac -Xlint options for all Scala projects
CHANGELOG_BEGIN
CHANGELOG_END
* move NoCopy to its own file
package.scala:18: warning: it is not recommended to define classes/objects inside of package objects.
If possible, define trait NoCopy in package data instead.
trait NoCopy {
^
* move more traits, classes, and objects to proper packages
- note that `package` is itself a scoping construct, so if your reason
is the apparent aesthetic of placing a bunch of things in one `package
object`, that is easily remedied by deleting the `object` keyword
* fix some type-parameter-shadow warnings
- I'm generally in favor of sensible name-shadowing, following the
"deliberately hide variables that should not be accessed here" school
of thought. But I think type name shadowing isn't quite as valuable
and more likely to confuse than general variable shadowing, so have
experimentally linted it out.
Example warning:
EventsTableFlatEventsRangeQueries.scala:11: warning: type parameter
Offset defined in trait EventsTableFlatEventsRangeQueries shadows class
Offset defined in package v1. You may want to rename your type
parameter, or possibly remove it.
private[events] sealed trait EventsTableFlatEventsRangeQueries[Offset] {
^
* fix more package-object-classes warnings
* fix an inaccessible warning
ContractsService.scala:197: warning: method searchDb in class ContractsService references private class ContractsFetch.
Classes which cannot access ContractsFetch may be unable to override searchDb.
def searchDb(dao: dbbackend.ContractDao, fetch: ContractsFetch)(
^
* enable -Xlint:infer-any
- continuing the saga of #6116, #6132
* enable -explaintypes for more detailed type errors
* missed header for NoCopy; probably should have left it in the package file
* misspelling in comment
* revert -Xlint:doc-detached
- there are a lot of these fixes, and they are noisy, so shifting to a
separate PR
- thanks to @leo-da for pointing out
* Move public code into daml-integration-api
CHANGELOG_BEGIN
[DAML Integration Kit]: Removed sandbox specific code from the API intended to be used by ledger integrations. Use the maven coordinates ``com.daml:participant-integration-api:VERSION`` instead of ``com.daml:ledger-api-server`` or ``com.daml:sandbox``.
CHANGELOG_END
* replace traverseU and sequenceU with traverse and sequence
- with -Ypartial-unification on, the extra Unapply typeclass lookup is
unnecessary
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* limit imports; we only need *> and void
* add lf_scalacopts to ledger-service/ projects
* handle unused warnings in http-json main
* handle unused warnings in lf-value-json
* handle unused warnings in http-json tests
* handle unused warnings in jwt
* JwtGenerator.generate doesn't use its argument; remove it
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* format bazel files
* add -Xsource:2.13, -Ypartial-unification to common_scalacopts
* add now-referenced scalaz-core where needed
* work around bad type signatures in scalatest Aggregating, Containing
* unused Any suppression
* work around bad partial-unification wrought by type alias
* remove unused Conversions import
- not required in 4f68cfc480 either, so unsure how it's survived this long
* work around Future.traverse; remove unused show import
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove unused bounds
* remove -Ypartial-unification and -Xsource:2.13 where they were explicitly passed
* longer comment on what the options do
- suggested by @stefanobaghino-da; thanks
* forget Future.traverse, just use scalaz, it knows how to do this
* LF: rename library transaction-scalacheck to transaction-test-lib
CHANGELOG_BEGIN
CHANGELOG_END
* move files in com/daml
* missing change in release/artifacts.yaml
* remove 'com/dam' from the path
* Add option based constructor for LedgerIdRequirement
changelog_begin
changelog_end
* Make option based consructor the default, deprecate old constructor
* Update with review comments
* disable Any wart
* first pass removal of Any suppressions for false positives
* second pass removal of Any suppressions for false positives
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* third pass removal of Any suppressions for false positives
* fourth pass removal of Any suppressions for false positives
* reformat newly single-suppressions into single lines
- suggested by @SamirTalwar-DA; thanks
* move integration-type tests in http-json to separate integration-tests target
* remove unused library deps from split tests
* remove resources from unit tests, set to medium size
* move resources to it subtree
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* register scala-collection-compat with java deps list
* add scala-collection-compat to http-json deps
* remove breakOut throughout http-json, replaced with view/to or iterator/to
* use scala 2.13-style `to` calls in http-json
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* use 2.13-style to in lf-value-json
* some fused size comparisons
* remove low-hanging breakOuts in daml-lf
* regenerate maven_install.json for scala-collection-compat
* regenerate maven_install.json for scala-collection-compat
* regenerate maven_install.json for scala-collection-compat
* equalz Scalatest matcher in new daml-lf/scalatest-tools library
* equalz typing tests
* a 'should' replacing design
* a 'MatcherFactory1' design
- this fails because the TC parameter should be a type member to avoid
scala/bug#5075 but it is not
* MatcherFactory1 with chained Lub+Equal typeclass
- requires partial-unification at point of use, which is not great
* LubEqual's extra tparam is probably unneeded
* better LtEqual
* demonstrate that HK LubEqual's resolve with DMT should + MatcherFactory
* remove unneeded 3rd param from LubEqual, again
* update dependency specs and license headers
* allow use with should, shouldNot in some cases, preserving the shouldx/shouldNotx alternatives
* move Equalz to libs-scala/scalatest-utils
* rename bzl targets and place in com.daml.scalatest package
* add scalatest-utils to release
* move *SpecCheckLaws, Unnatural to scalatest-utils
* missed scalacheck dep in scalatest-utils
* downstreams of *SpecCheckLaws now get them from scalatest-utils
* test equal-types case as well
* update LF documentation
CHANGELOG_BEGIN
CHANGELOG_END
* whitespace error
* Revert "disable test pending tracking down duplicates"
This reverts commit 8b5f9dfa04.
* activeContracts tells caller the ledgerEnd, rather than accepting activeAt argument
* naive port of http-json tests to sandbox-next
* Revert "naive port of http-json tests to sandbox-next"
This reverts commit 91d4590c90.
* lock before grabbing acs and ledgerEnd offset in InMemoryLedger
- as suggested by @gerolf-da; thanks
* Consume language for listing [re]actions in a foldAsync linearly
* eagerly consume as many Futures as possible
* restate one foldAsync test with Consume
* report value that failed to match
* add error locations and new `drain` primitive
* use `drain` to properly handle heartbeats at end of stream
* it doesn't make sense to delay the drain step
* rewrite other websocket test; document syntax
* get rid of StreamState, finally
* split Consume to a separate file
* plan split tests
* functions for consuming SplitSeq
* converting SplitSeq into stream actions
* exercise and check recursively
* add one 100-sized sample to the tests
* don't violate Iou's invariant
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* disable test pending tracking down duplicates
- as discussed with @leo-da
* postgresql-testing: Store the JDBC URL separately.
* postgresql-testing: Expose the username and password.
* postgresql-testing: Get the caller to create the database.
And make sure it's a random one, not "test".
CHANGELOG_BEGIN
CHANGELOG_END
* postgresql-testing: Only store the JDBC URL for tests.
Less mutable state, innit.
* postgresql-testing: Capture the individual JDBC URL parameters.
* Bazel: Fix PostgreSQL binary paths.
* postgresql-testing: Just recreate the database in PostgresAroundEach.
There's no need to restart the process with a different data directory.
CHANGELOG_BEGIN
- [JSON API] The check that connections are made through a reverse-proxy
providing HTTPS, ensuring that JWT tokens don't leak, only logs a warning
rather than rejecting the request.
See `issue #5856 <https://github.com/digital-asset/daml/pull/5856>`_.
CHANGELOG_END
* add GenMap to the "all types" test generators
* report bad GenMap format with DeserializationError, not MatchError
* document GenMap JSON
* notes on missing features
* enable -Xsource:2.13 in transaction
* make an Order instance for Value resolvable, but unimplemented
* use the skeleton from SValue ordering to make a Value ordering skeleton
* add Party Order
* add Order instance for SortedLookupList
* add Order for FrontStack, deriving everything
* factor the Order lookup, and tie a knot in the recursive Value instances
* we're going to need this Iterator thing again
* replacing Order#contramap with version that supports equalIsNatural
* use new equalBy, orderBy for FrontStack, SortedLookupList, ImmArray
* _2 comparator, upgrade Name Equal to an Order
* incorporate lookup for enums, variants into Value order; record/struct cases
* Enum/Variant comparison
* looking up the singleton implicitly won't work for non-`object`s, alas
* test Order laws for values of all primitive types
* test Order laws for record and variant types
* test Order laws for enum types
* test that enum strings are not compared
* use checkLaws for Value Equal as well
* test that enums match order to constructor rank
* factor genAddend and genAddendNoListMap
* reintroduce Order for TypedValueGenerators
* more addend order
* record, variant order cases
* record cons order
* deriving Order while decoding from JSON
* make ApiCodecCompressed's Cid codec based on the typeclass
* test how the Value ordering and the underlying projected value orderings line up
- hint: they don't, yet
- this is also a template for how we'll check the fidelity with SValue
ordering
* test how the Value ordering and SValue ordering line up
- hint: they don't, yet
* typed Arbitrarys have access to Order
* produce proper ValueGenMap
* inj requires Order, sometimes
- we encode this as "all the time" but there is a type-level unification
approach to remove this requirement in some cases
* make inj a function
* test that order doesn't matter for JSON decoder
* use Utf8 order for TVG text; don't pretend that base equal works
* sort JSON GenMaps, and check for duplicates
* make injarb use IntroCtx
* remove stray import
* Order instances for Bytes, Hash, AbsoluteContractId
* require Order[Cid] to decode JSON to LF values
* clean up map reordering test
* remove unused Instant instance
* fake Order instance no longer needed, valid instance defined
* test parity of global AbsoluteContractId order and SContractId order
* bazel fmt
* test AbsoluteContractId Order lawfulness
* test duplicate key detection
CHANGELOG_BEGIN
- [JSON API] Prepare full support for the planned GenMap primitive type.
See `issue #5031 <https://github.com/digital-asset/daml/issues/5031>`_.
CHANGELOG_END
* new --leak-passwords-firesheep-style option; functions to check forwarded protocol
* enforce https reverse-proxy in all JWT-accepting endpoints
* make HttpService.start take config record
* test that X-Forwarded-Proto or Forwarded is enforced
* use new start signature in daml-script tests
* use insecure http mode for ts codegen tests
* note on regex
* use insecure option in daml assistant integration tests
* log allowNonHttps setting
* add non-https option to more places in daml-assistant tests
* add non-https option to getting started guide
* rename --leak-passwords-firesheep-style to --allow-insecure-tokens
- per suggestion by @garyverhaegen-da, @hurryabit
CHANGELOG_BEGIN
- [JSON API] By default, checks that connections are made through a reverse-proxy
providing HTTPS, ensuring that JWT tokens don't leak. To disable this check,
such as for development, pass ``--allow-insecure-tokens``.
See `issue #5572 <https://github.com/digital-asset/daml/issues/5572>`_.
CHANGELOG_END
* daml start includes --allow-insecure-tokens by default
- as indicated by @cocreature
* Use a custom Gen instead of Arbitrary, to generate nonempty Vec[Int],
the test could fail on empty input, it expects at least one input message
changelog_begin
changelog_end
* Address code review comments
* add Order instances to various types in LF data, transaction
* define scope-dependent Order for Value; test compatibility with SValue order
* support Order in TypedValueGenerators
* generate properly-ordered ValueGenMaps in TypedValueGenerators
* factor genAddend and genAddendNoListMap
* test Value.orderInstance fidelity with well-typed Orders
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* shrink Maps for better debugging
* line up base List and GenMap orders with svalue
* unhandled cases in custom comparator for ApiValueToLfValueConverter tests
- hazards of not using match2
* adapt to PureCompiledPackages changes
changelog_begin
[JSON API]
Pass through endpoints do not require party specified in the JWT:
- ``/v1/parties``
- ``/v1/parties/allocate``
- ``/v1/packages``
See #5313.
changelog_end
* DAR file upload, DALF download, list all DALF package IDs
Reload packages after dar upload
changelog_begin
[JSON API]
Add package management pass-through endpoints. See #4823.
- GET /v1/packages -- returns all package IDs
- GET /v1/packages/<package ID> -- downloads the DALF package
- POST /v1/packages -- uploads a DAR file to the ledger
changelog_end
* Fixing docs
* minor improvements + cleanup
* factor TlsConfiguration parser from extractor
* move TlsConfigurationParser to new library
* link extractor to ledger-service/cli-opts properly
* use TlsConfigurationCli in http-json, pass SslContext to ledger-client
* test TLS options as used in http-json
- the TLS config code is shared with extractor, where it is more fully
tested; we just do a sanity check here
* doc TLS options for http-json
CHANGELOG_BEGIN
- [JSON API] New ``--pem``, ``--crt``, ``--cacrt``, and ``--tls`` options
for securing the connection between JSON API server and ledger.
See `issue #2540 <https://github.com/digital-asset/daml/issues/2540>`__.
CHANGELOG_END
* TLS off in daml-script JSON API test
* Adding `--port-file` support
* ``--port-file`` support
* Updating docs
changelog_begin
[JSON API] Add support for ``--port-file`` command line option.
``--http-port 0 --port-file ./json-api.port`` will pick up a free port
and write it into ``./json-api.port` file.
changelog_end
* reformatting
* Usage grammar
* use bimap
* Adding `PortFiles` utility for creating and deleting port files on JVM exit
* Adding scaladoc explaining that the port file should be deleted on
JVM termination.
* Updating usage and docs to reflect that the file must be unique and
will be deleted on graceful shutdown
* Relying on `java.nio.file.FileAlreadyExistsException` to determine the
case when failed due to the nonunique file name.
* toString instead of Exception.getMessage
java.nio exception's getMessage can be just a file name, need the class
name to capture the error context.
* updatePortFile -> createPortFile
* write to file instead of write into file
* Set the `Bearer ` prefix in bindings.
* Make the `Bearer ` prefix in the authorization header mandatory.
* Bearer prefix can be removed from the token file.
CHANGELOG_BEGIN
[Extractor]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
[Navigator]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
[DAML Script] The ``Bearer `` prefix can be removed from the token file. It
is added automatically.
[DAML Repl] The ``Bearer `` prefix can be removed from the token file. It is
added automatically.
[Scala Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
[Java Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
[DAML Integration Kit] ``AuthService`` implementations MUST read the
``Authorization`` header and the value of the header MUST start with
``Bearer ``.
CHANGELOG_END
Packages com.digitalasset.daml and com.daml have been unified under com.daml
Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.
CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
* non empty set of template IDs in domain.GetActiveContractsRequest
* Updating expected error message
changelog_begin
changelog_end
* Adding warnings field to domain.ErrorResponse
* Error messages constants
* using domain.AsyncResponse
* added todo
* Updating examples
changelog_begin
changelog_end
* Updating examples
* Fixing the case when head is part of the tail, as pointed by @S11001001
* Fixing the domain.SynResponse JSON reader,
report deserialization error when both 'errors' and 'result' fields
present, as pointed by @S11001001
* Addressing code review comments
* Use com.daml as groupId for all artifacts
CHANGELOG_BEGIN
[SDK] Changed the groupId for Maven artifacts to ``com.daml``.
CHANGELOG_END
* Add 2 additional maven related checks to the release binary
1. Check that all maven upload artifacts use com.daml as the groupId
2. Check that all maven upload artifacts have a unique artifactId
* Address @cocreature's comments in https://github.com/digital-asset/daml/pull/5272#pullrequestreview-385026181
* report UnknownTemplateIds warning before sending an error
if no template IDs resolved, send warning before the error, this is for
consistency with the case when at least one ID resolved (we continue
processing request in this case).
changelog_begin
changelog_end
* adding an error message example
* change title
* clarifying what on-message means.
* formatting
* Addressing code review comments
* http-json: Ask for a free port by specifying port 0.
This will avoid race conditions.
* bindings-akka-testing: Delete RandomPorts; it's unused.
* ports: Fix the Bazel test glob.
* ports: Move FreePort to postgresql-testing and add a test case.
* postgresql-testing: Make `FreePort.find()` return a `Port`.
* postgresql-testing: Lock free ports until the server starts.
This uses a `FileLock`, which should work well on all our
supported operating systems as long as everyone agrees to use it.
CHANGELOG_BEGIN
CHANGELOG_END
* postgresql-testing: Try to find a free port 10 times, then give up.
* postgresql-testing: Use a shared directory for the port lock.
* postgresql-testing: Try an alternative way of getting `%LOCALAPPDATA%`.
* minor refactoring in preparation for the next test case
* allow only one input request + test, WIP
* allow only one input request + test, WIP
* Error when multiple requests coming over the same websocket connection
This never worked, we never returned anything when 2nd request received,
now we return an error and drop the connection.
changelog_begin
changelog_end
* update docs
* Fixing copyright header
* changing test description
* trying to clean wsMessageHandler up
* Reverting getTransactionSourceForParty changes
* ContractKeyStreamRequest with different types for whether offset-preceded or not
- should replace EnrichedContractKey as the WS StreamQuery type
* add the ContractKeyStreamRequest layer everywhere
* split StreamQuery parse from the other steps
* make StreamQuery type depend on the input JsValue
* only StreamQueryReader is a typeclass now
* scalafmt
* wrong type arg
* letting the request data and phantom archive removal choice flow
- from work with @leo-da
* finish threading request-derived phantom state to removal flow
- from work with @leo-da
* make it clear that hints are contract IDs in StreamQuery
- from work with @leo-da
* treat StreamQueryReader's type parameter fully as a phantom
- from work with @leo-da
* remove unused type alias
- from work with @leo-da
* test fetch resume, with and without various offsetHints
* document offsetHints
* missing ` in rst
- thanks @hurryabit
* rename offsetHint to contractIdAtOffset
CHANGELOG_BEGIN
- [JSON API - Experimental] New field ``contractIdAtOffset`` for fetch-by-key streams
to restore proper archive filtering.
See `issue #4511 <https://github.com/digital-asset/daml/issues/4511>`_.
CHANGELOG_END
* we never unify the two ContractKeyStreamRequest types
* doc update for contractIdAtOffset
changelog_begin
[JSON API - Experimental]
Remove ``ledgerEffectiveTime`` and ``maximumRecordTime`` fields from command ``meta``. Remove ``--default-ttl`` command line argument. The ledger time and TTL are automatically computed by the submission service now. See #5090.
changelog_end
Contributes to #4194.
Closes#4231.
Closes#5022.
CHANGELOG_BEGIN
- [Ledger API] The protobuf fields ledger_effective_time and maximum_record_time have been removed from
command submission. These fields were previously deprecated following the introduction
of a new ledger time model. See issue `#4194 <https://github.com/digital-asset/daml/issues/4194>`__.
[Java Bindings] removed the usage of ledgerEffectiveTime and
maximumRecordTime, and instead added minLedgerTimeAbsolute and
minLedgerTimeRelative in CommandSubmissionClient and CommandClient
CHANGELOG_END
* building a GenMap generator
* move Party Order to accessible place; test whether Name Equal is still in use
* add Order instance for SortedLookupList
* switch to Map for genMap's Inj; more Order instances
* remove all Order from TypedValueGenerators
* Revert "add Order instance for SortedLookupList"
This reverts commit 03a59a8249.
* moving the Equal instance means scenario-interpreter no longer direct-deps scalaz
* add a test using TypedValueGenerators GenMap
* remove Party Order
* refmt bazel
* remove stray import
* followup dep change to moving the Equal[Name] instance
* add changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Name equal instance appears to be no longer used, but keeping anyway
* Streaming API error handling
* Stopping the stream after emitting the 1st error
* Cleaning up test cases, stricter type for non empty streaming fetch
* Update docs.
changelog_begin
[JSON API - Experimental] Change Streaming API error format to match synchronous API:
``{"status": <400 | 401 | 404 | 500>, "errors": <JSON array of strings> }``. See #4521
changelog_end
* a few words about warnings in the Streaming API
* a few words about warnings in the Streaming API
* Updating command formatting in the JavaScript example.
* remove List and TextMap support from the JSON query language
CHANGELOG_BEGIN
- [JSON API - Experimental] Removed support for maps and lists from the query language.
See `issue #4855 <https://github.com/digital-asset/daml/issues/4855>`_.
CHANGELOG_END
* GenMap won't be supported in general, remove FIXME
- thanks @leo-da
* more documentation on unsupported query types
- as suggested by @hurryabit; thanks
* Bumping up http-json tests size to large, adding some extra logging
* Removing the logging from prod code, adding some in tests.
changelog_begin
changelog_end
Avoiding `damlc compile/package` commands (which we would like to deprecate), and replace with plain `damlc build` together with a post dar->dalf extraction step in the couple of places where we actually want the .dalf for testing.
changelog_begin
changelog_end
* 2nd part of stabilizing flaky websocket integration test,
handling empty events, which we may receive a bunch in the end of the test
when there is no activity
changelog_begin
changelog_end
* fixing `Offset.semigroup`, thanks @S11001001!
* Allocate party JSON API endpoint
changelog_begin
[JSON API - Experimental]
Allocate party endpoint added: ``/v1/parties/allocate``. See #4638.
changelog_end
* cleanup
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/LedgerClientJwt.scala
Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* capture the pattern of an optional stream input prefix
* allow LiveBegins to be appended
- should have been included with #4593
* StreamQuery will parse JsValues instead of Strings
* shortcut in HttpServiceTestFixture; clean up InsertDeleteStepTest
* compatibly add withOptPrefix stage to WS input
* parsing the offset argument
* add offset parsing to input stream, but drop it on the floor
* another form of the two cases
* percolate the starting offset to the next step
* percolate the starting offset to the next step
* percolate the starting offset to the next step
* use transactionsFollowingBoundary in ContractsService if begin offset specified
* integration test for scan from offset in WS query
* tool for catching the first offset in a stream
* documentation
* add changelog entry
CHANGELOG_BEGIN
- [JSON API - Experimental] WebSocket endpoints now support an optional offset argument.
See `issue #4509 <https://github.com/digital-asset/daml/issues/4509>`_.
CHANGELOG_END
* move offset argument doc to later
- suggested by @hurryabit; thanks
* remove stray TODO
- pointed out by @leo-da; thanks
* redesign withOptPrefix to make the usage a little easier to follow
- suggested by @leo-da; thanks
* Capture lastSeenOffset in the @volatile var
CHANGELOG_BEGIN
[JSON API - Experimental] Websocket stream now emits last seen offset instead of the heartbeat message.
``{"heartbeat": "ping"}`` is replaced by ``{"events":[],"offset":"<last seen offset>"}``. See #4510.
CHANGELOG_END
* updating docs
* moving the last seen offset into the stream, WIP
* adding in-stream state
* minor docs
* cleanup the heartbeat logic
* minot cleanup
* Change live and heartbeat msg handling + some debug logging (to be removed)
* fixing ts tests, cleaning up
* Adding todo with the reference to the follow-up ticket
* Adding todo with the reference to the follow-up ticket
Both were previously binding 0.0.0.0, which is inherently insecure. More
importantly to me, that meant running `bazel test //...` essentially
rendered my computer unusable for however long it took (which is
_long_), as it kept popping up focus-stealing dialogs about whether or
not I wanted to trust "java" to open an incoming network connection.
The ScenarioService does not seem to have an existing setup for CLI args
and my Scala-fu is not good enough to add one, so I just changed the
hard-coded path.
The JSON API already had an option, just with the wrong default. This is
technically a breaking change, but I'm hoping to pass it under the
"experimental" flag we still have on the JSON API.
CHANGELOG_BEGIN
- [JSON API - Experimental] As a security improvement, the JSON API
server will now bind on ``127.0.0.1`` by default. Previous behaviour was
to bind on ``0.0.0.0``; you can get that behaviour back by passing in
the (existing) flag ``--address 0.0.0.0``.
- [DAML SDK] The Scenario Service will now bind on ``127.0.0.1``. Previous
behaviour was to bind on ``0.0.0.0``.
CHANGELOG_END
* make append of two liveness markers proper with respect to offsets
- never happens in a real stream, but satisfying some random tests
- test randomly harder
CHANGELOG_BEGIN
CHANGELOG_END
* move Monoid and Semigroup instances for Steps to main code
- suggested by @leo-da; thanks
* stray empty InsertDeleteStep
* Filter out contracts received from gRPC stream, if template IDs is unknown (pending package reload).
* minor cleanup
CHANGELOG_BEGIN
[JSON API - Experimental] Fix ``java.util.NoSuchElementException: key not found: TemplateId(xxx,yyy,zzz)`` error in the log for query and fetch endpoints. See #4761
CHANGELOG_END
* libs-scala/ports: Wrap socket ports in a type, `Port`.
* sandbox: Use `Port` for the API server port, and propagate.
CHANGELOG_BEGIN
CHANGELOG_END
* extractor: Use `Port` for the server port.
* ports: Make Port a compile-time class only.
* ports: Allow port 0; it can be specified by a user.
* ports: Publish to Maven Central.
* Extract ErrorOps, use liftErr instead of leftMap
JSON error formatting cleanup
CHANGELOG_BEGIN
CHANGELOG_END
* Good we have tests for this stuff
* Apply https://github.com/scala/bug/issues/3664 work-around,
so JsonError can be used instead of JsonError.apply
* error formatting
* move BeginBookmark to util
* adding offsets to steps
* offsetAfter belongs in Txn, not InsertDeleteStep
* make transaction stream a ContractStreamStep.Txn stream
* add several ContractStreamStep append cases
* rewrite 'render' to emit offset in the right places
* make ContractStreamStep#append total again
* check for offset in a few tests
* revert useless whitespace changes
* missed argument
* simpler mapPreservingIds
* rewrite states for new "live" format
* remove invalidated "events" block structure assertions
* make shutdown in withHttpService deterministic, to try to catch race condition
* exhaustiveness checking somehow disabled; fixed fetch flow and all is well
* documentation and changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Remove ``{"live": true}`` marker from websocket streams;
instead, live data is indicated by the presence of an "offset".
See `issue #4593 <https://github.com/digital-asset/daml/pull/4593>`_.
CHANGELOG_END
* be more specific about what liveness marker may be in docs
* fix daml2ts websocket tests
* mention type rules for all cases in offset documentation
* Extend /party endpoint to allow specifying party ids
* Extend /party endpoint to allow specifying party ids
* Update docs
CHANGELOG_BEGIN
[JSON API - Experimental] Fetch Parties by their Identifiers. See #4512
``/v1/parties`` endpoint supports POST method now, which expects
a JSON array of party identifiers as an input.
CHANGELOG_END
* minor update
* minor update
* Use type alias
* Add warnings to the sync response
* test cases
* update docs, add test case for an empty input
* cleanup
* cleanup
* Addressing code review comments
* Avoid opening a server to the world when finding a free port.
This is very annoying on macOS because we get a focus-stealing popup for
a split second, asking for permission to allow the server through the
firewall. The popup pretty much always disappears before it can even be
read, when the server is closed.
This is almost certainly not an attack vector, because:
- we only do this in tests,
- the server is open for only a few milliseconds,
- nothing is served,
- and finding the port is tricky, because it's effectively random.
Nevertheless, it's very annoying.
CHANGELOG_BEGIN
CHANGELOG_END
* Extract a Bazel package for finding free ports.
We seem to do it in 4 different places, which I think is enough to
remove the duplication.
* kvutils: Extract a committer from the uses of `SubmissionValidator`.
This makes the clock injectable too.
* kvutils: Provide logging contexts in the `Runner`.
* sandbox: Remove the `StaticAllowBackwards` time provider type.
It's not used anywhere.
* sandbox: Fix warnings in CliSpec.
* sandbox: Ensure that we cannot specify both static and wall-clock time.
* sandbox-next: Crash if wall clock time is not specified.
* sandbox-next: Document more known issues in the new Sandbox.
* sandbox: Add a Clock (and some tests) to TimeServiceBackend.
* sandbox-next: Support static time.
CHANGELOG_BEGIN
- [Sandbox Next] Re-establish static time mode.
CHANGELOG_END
* ledger-on-(memory|sql): Expect a `() => Instant`, not a `Clock`.
* Inserts alias
* ContractStreamStep, extending InsertDeleteStep with a boundary
* partitionBimap, an IDS utility for partitionMap on both inserts and deletes
* make the flow setup of acsFollowingAndBoundary a little clearer
* use partitionBimap to simplify websocket response stream
* make the flow setup of transactionsFollowingBoundary a little clearer
* acsFollowingAndBoundary becoming a ContractStreamStep producer
* insertDeleteStepSource also becomes a ContractStreamStep producer
* porting StepAndErrors to ContractStreamStep
* remove Acs constructor of ContractStreamStep
- it's an interesting idea for future potential features, but not useful
right now so just a needless complication
* adapt convertFilterContracts to presence of LiveBegin marker
* adapt removePhantomArchives to presence of LiveBegin marker
* test that live marker is emitted in the right place
* document liveness marker
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Add ``{"live": true}`` to WebSocket streams
to mark the beginning of "live" data. See `issue #4461
<https://github.com/digital-asset/daml/issues/4461>`_.
This marker is a placeholder feature; `issue #4509 bookmarks in query
streams <https://github.com/digital-asset/daml/issues/4509>`_ will
obsolete this marker, after which it will no longer be emitted. When
building features on the marker, be aware of this forthcoming
replacement.
CHANGELOG_END
* be a little more prepared for offsets
* sandbox: Move more resource acquisition into the `owner`.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Reimplement SandboxClientResource as a resources.Resource.
* codegen: Use resources in TestUtil.
* sandbox: Manage PostgreSQL in tests with ResourceOwners.
* Extract partial functions for DABL to re-use
CHANGELOG_BEGIN
CHANGELOG_END
* Actually DABL needs total functions,
they will map them to different endpoints
* move InsertDeleteStep to util
* turn append cid argument into a typeclass
* use Cid for appendForgettingDeletes as well
* add secondary data to the deletes in InsertDeleteStep with new covariant tparam
* make StepAndErrors hold ArchivedContracts so ws archives look like exercise archives
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] The format of ``archived`` responses from WebSocket endpoints
has changed to include template IDs, similar to exercise responses.
See `issue #4383 <https://github.com/digital-asset/daml/issues/4383>`_.
CHANGELOG_END
* rename "contracts" to "events" in JSON API exercise response
CHANGELOG_BEGIN
- [JSON API - Experimental] Exercise response field "contracts" renamed to "events".
See `issue #4385 <https://github.com/digital-asset/daml/issues/4385>`_.
CHANGELOG_END
* more events in doc
- pointed out by @leo-da; thanks
* Remove phantom archive when streaming events filtered by contract key
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Test case to validate phantom archive filter for stream/fetch
* Use `scan` instead of `statefulMapConcat` to filter out phantom archives
advantage(???) immutable state vs mutable
* make `com.digitalasset.http.WebsocketEndpoints.handleWebsocketRequest` public
so DABL can call it directly, `private[http]` does not work since DABL
is under com.projectdabl, see #4190
* Fixing typos
* Scalafmt
* Scalafmt
* Removing unused function
* Update docs
* Remove unused type alias
* CHANGELOG_BEGIN
[JSON API - Experimental]
- Added streaming version of fetch by key: ``/stream/fetch``. See #4075.
CHANGELOG_END
* Address code review comments
* Add test case with todo to address consistent handling of empty requests
* Fixing merge conflicts
* Addressing code review comments
* Addressing code review comments
Use `partition` instead of consecutive intersect and diff
[JSON API - Experimental]
Added a command line option to allow overriding default TTL.
``--default-ttl <value>`` Optional Time to Live interval to set if not provided in the command. Examples: 30s, 1min, 1h. Defaults to 30 seconds
CHANGELOG_END
* add SearchForeverRequest with one-or-many JSON model
* the least structured way to flatten a query union into a single stream
* add somewhere for indices to go in StreamQuery
* unzipMap utility
* doc Positive
* collect indices for SearchForever predicate, and use only one Map
* interface for rendering positions
* finish propagating positives from the predicate to the rendering phase
* add matchedQueries to every `created` in the searchForever results
* test that matchedQueries indices are included in query stream blocks
* document query union
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] ``/contracts/searchForever`` accepts multiple queries,
and includes with each ``created`` result the ``matchedQueries`` indicating which
queries matched.
See `issue #4363 <https://github.com/digital-asset/daml/pull/4363>`_.
CHANGELOG_END
* remove unused unzipMap
* ensure archive of a key happens to left of create of same key in each WebSocket result block
CHANGELOG_BEGIN
- [JSON API - Experimental] In websocket endpoints, if a 'created' and 'archived' contract
in the same result array share a contract key, the 'archived' is guaranteed to occur
earlier in the array than the 'created'.
See `issue #4354 <https://github.com/digital-asset/daml/issues/4354>`_.
CHANGELOG_END
* by key I mean contract key
- suggested by @hurryabit; thanks
* in searchForever, warn on unknown template IDs as long as at least one is known
* remove unused resolveTemplateId
* factor out WS request parts in WS integration test
* factor out IOU create
* test early template ID warning in searchForever stream
* document warnings case for searchForever
CHANGELOG_BEGIN
- [JSON API - Experimental] Precede stream with warnings of unknown template IDs, if any,
rather than failing outright.
See `issue #4290 <https://github.com/digital-asset/daml/issues/4290>`_.
CHANGELOG_END
* Fix the case when start offset > end offset
Actually skip the call completely, all needed data supposed to be
already in the query-store, fetched by a concurrent thread/client.
Moving the check into the `getCreatesAndArchivesSince` call
CHANGELOG_BEGIN
CHANGELOG_END
* Remove flaky, want to see the test failing.
* reformat
* Add AbsoluteOffsetOrdering so we can handle both offset formats
* Code review comments
* generators WIP
* generators WIP
* testing the laws
* remove `implicitly` call
* test that step conflation yields consistent results with unconflated streams
CHANGELOG_BEGIN
CHANGELOG_END
* check that relevant right deletes are definitely included
* use a smaller set of potential Cids to have better overlap testing
CHANGELOG_BEGIN
[JSON API - Experimental]
Fixing package reload scheduling. The bug was introduced when upgraded
to the most recent Akka library. Also using `scheduleWithFixedDelay` and
awaiting for the reload future to complete. This is to guarantee that we
don't trigger multiple reloads simultaneously. Package reload is
thread-safe though.
CHANGELOG_END
Unfortunately, downgrading `scalafmt` resulted in files that would be
reformatted to invalid code, because lines would be merged but trailing
commas would be left in.
I've manually run it everywhere and fixed these issues so people don't
have to fix them as they go.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* make searchInMemory do only one transaction stream
* drop unneeded deletes from memory while doing searchInMemory
* remove unused functions
* rename OffsetBookmark to BeginBookmark
* add AtAbsolute option to GetCreatesAndArchivesSince
* add GetTermination raw command
* propagate GetTermination to ContractsFetch
* remove fetching from searchDbOneTpId_
* fetch multiple contract IDs for DB persistence always to a fixed offset
* bugfix and cleanup; no changelog relevant
CHANGELOG_BEGIN
CHANGELOG_END
* postgresql-testing: Extract `PostgresAround` from the Sandbox tests.
CHANGELOG_BEGIN
CHANGELOG_END
* postgresql-testing: Split into several files.
* postgresql-testing: Pull out the host and database names into variables.
* postgresql-testing: Don't publish to Maven.
I have no idea why the build wasn't failing before.
* postgresql-testing: Assimilate the `@postgresql_dev_env` dependency.
* Introduce new JWT payload format
... the reader still supports old formats
CHANGELOG_BEGIN
[Sandbox] The sandbox uses a new payload format for authentication tokens (JWTs).
The old format is deprecated, but still works.
[JSON API] The HTTP JSON API now uses the same payload format for authentication tokens as the sandbox.
The old format is deprecated, but still works.
CHANGELOG_END
* Add helper function for getting token party
* Support sandbox tokens in JSON API
* Add warning for deprecated formats
* Update documentation
* Add explicit test for new format
* Update JSON API documentation
* Fix test
* Implement exercise by key
ExerciseCommand got a new required element: `reference` of polymorphic type.
* Add test case: exercise Archive by contractKey
* Add test case for ExerciseCommand JSON protocol
* flatten contract reference in ExerciseCommand JSON protocol
* formatting
* Update exercise by key
* Update documentation
CHANGELOG_BEGIN
- [JSON API - Experimental] Support Exercise by Key. See #4009.
CHANGELOG_END
* Address code review comments
* for searchForever, use a similar response format to exercise results
CHANGELOG_BEGIN
- [JSON API - Experimental] Response format in ``searchForever`` changed to be more like ``exercise``.
See `issue #4072 <https://github.com/digital-asset/daml/issues/4072>`__.
CHANGELOG_END
* typo left from add->created replacement
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* in query argument, rename %templates to templateIds, and nest query under 'query' field
CHANGELOG_BEGIN
- [JSON API - Experimental] In 'search' endpoint arguments, %templates is now templateIds.
Additionally, all contract query fields must occur under 'query'.
See `issue #3450 <https://github.com/digital-asset/daml/issues/3450>`__.
CHANGELOG_END
* fix other old query format usages
* minor improvements on websocket and add websocketIT
* add it for websocket, and support config args
* add one more test case
* make ws config optional
* avoid fromTryCatchNonFatal when derivative already exists
* spelling and missing type parameter
* use richer Matchers in WebsocketServiceIntegrationTest
* scalafmt
* IDEs may love braces but we don't
* utility for simplifying FanOutShape2s; use in ContractsService
* split matSecondOut into generalization; make compile again
* match matSecondOut utility with standard utility methods
* spelling
* getCreatesAndArchivesSince doesn't need to query the transaction boundary
* boolean newtype utility
* split up transactionMessageHandler into components
* decodeAndParsePayload passes through the Jwt
* clean up config and default WS config
* take multiple template IDs for insertDeleteStepSource
* replace websocket return with {errors, add, remove}, based on acsFollowingAndBoundary
* parse ValuePredicate in websocket
* remove unused lfvToJson
* nominal internal state for emitted WS steps-and-errors
* missing copyright headers
* add filtering to convertFilterContracts
* add step conflation to websocket output
* move conflation to static function
* rename /transactions endpoint to /contracts/searchForever
* empty requests are not allowed; numConns is per-service
* option for GetCreatesAndArchiveSince to not terminate; use in WebsocketService
* start of searchForever documentation
* stub searchForever longer test
* use valueOr
* don't run all other tests again with WebsocketServiceIntegrationTest
* start of websocket delta test
* solve init order problem with AbstractHttpServiceIntegrationTestFuns
- previous order caused test set to be cleared; mutation is intuitive
for sure!
* full flow test, fails for lack of create/exercise yet
* passing full flow test
* full documentation examples
* rename add/remove to created/archived
* cleaner NewBoolean.Named
* document heartbeats
* document subprotocols for searchForever
* note about the tests mysteriously terminating
* ensure create has happened before attempting query in tests
* reorganize multi-step WS test so its states and assertions are clearer
* filter out heartbeats in raw string tests
* factor out ContractDelta
* make exercisePayload easier to read
* filter out heartbeats in conversation test
* remove type lambda
* accept chunked queries
- clients may not be in control of how query bodies are delivered to the
server, so we should be agnostic in that respect
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] WebSocket contract search at ``/contracts/searchForever``.
See `issue #3936 <https://github.com/digital-asset/daml/pull/3936>`_.
CHANGELOG_END
* adapt to #3991 template ID strings
* adapt to #3971 argument -> payload
* fix create command for test (string template ID redux)
* adapt to #4014 ResolveTemplateId change
* update copyright headers
* rebuild WS example output to match latest changes
- thanks @leo-da
* SeqOps is not a safe name
* don't need breakOut anymore
* use util library form of partitionMap
- thanks @leo-da for pointing it out
Co-authored-by: lima-da <54044170+lima-da@users.noreply.github.com>
* WIP
* test cases updated
* `PackageService.resolveTemplateId` returns `Option[TemplateId]` now
used to return `Error \/ TemplateId`. There are scenarios when unresolved
TemplateID is a warning and not an error, which was the initial design
* CHANGELOG_BEGIN
[JSON API - Experimental]
``/contracts/search`` endpoint reports unresolved template IDs as warnings, see #3771::
{
"warnings": {
"unknownTemplateIds": ["UnknownModule:UnknownEntity"]
},
"result": [{...}, ...],
"status": 200
}
CHANGELOG_END
* Addressing codereview comments
* `partitionMap` is now part of `http.util.Collections.SeqOps`
* test cases: domain.TemplateId JSON serialization to JsString
* JSON protocol updated
* Fixing json-api test cases
* test cases: domain.TemplateId JSON serialization to JsString
* JSON protocol updated
* Fixing json-api test cases
* Adapt daml2ts and support libraries
* Update documentation
CHANGELOG_BEGIN
[JSON API - Experimental]
- Use JSON string to encode template IDs. Use colon (``:``) to separate parts of the ID.
The request format, with optional package ID:
- "<module>:<entity>"
- "<package ID>:<module>:<entity>"
The response always contains fully qualified template ID in the format:
- "<package ID>:<module>:<entity>"
See #3647.
CHANGELOG_END
* Minor documentation formatting changes.
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* Aligning DB contract table with domain.ActiveContract class
adding key,signatories, observers and agreement_text to DB contract table
removing witnessParties
Reading signatories and observers from contracts table
Updating doc, removing witnessParties
Address code review comments, thanks @S11001001
CHANGELOG_BEGIN
[JSON API - Experimental]
- Align ``contract`` table with ``domain.ActiveContract`` class.
The database schema has changed, if using ``--query-store-jdbc-config``,
you must rebuild the database by adding ``,createSchema=true``. See #3754.
- ``witnessParties`` field is removed from all JSON responses.
CHANGELOG_END
* Fix TypeScript domain models
remove witnessParties and workflowId fields. workflowId has be removed
from JSON output a while ago.
- [JSON API - Experimental] When contract is not found, ``/contracts/lookup`` endpoint returns
``{"status":200,"result":null}`` instead of ``{"status":200,"result":{}}``.
This is consistent with how DAML-LF JSON Encoding spec treats Optional.
CHANGELOG_END
* Change variant json encoding,
adding integration test
* Add DamlLfTypeLookup dependencies
* Add MetadataReader
* Add test WIP
* Add serialize test cases
* Add serialize test cases, WIP
* Test for variant encoding decoding
* Solving merge conflicts
* Updating roundtrip test
* Minor cleanup
* Addressing code review comments
Add JsonVariant custom matcher
* Update specification
* Update link
* Add test case, WIP
* Add proper template key resolution
* Got rid of choice record ID resolution, resolving choice type and key type
* Fixing logging
* Add Contract Key decoding tests
* cleanup
* cleanup
* Update JSON variant encoding tests
* Add more contract key JSON decoding tests
* Fix variant JSON encoding
* Change value predicate to support new variant encoding
* Change value predicate to support new variant encoding
* Add lookup by contract key test case
where contract key contains variant and record
Add `requiredResource` to bazel utils
CHANGELOG_BEGIN
- [JSON API - Experimental] Change variant JSON encoding. The new format is ``{ tag: data-constructor, value: argument }``.
For example, if we have: ``data Foo = Bar Int | Baz``, these are all valid JSON encodings for values of type Foo:
- ``{"tag": "Bar", "value": 42}``
- ``{"tag": "Baz", "value": {}}``
See #3622
- [JSON API - Experimental] Fix ``/contracts/lookup` find by contract key.
- [JSON API - Experimental] Fix ``/command/exercise`` to support any LF type as a choice argument.
See #3390
CHANGELOG_END
* minor cleanup
* Fix copy/paste
* Renaming
* Got rid of DAML LF identifier resolution
resolving DAML LF Type based on command type
* Address code review comments, thanks @S11001001
* Address code review comments, thanks @S11001001
Do not include any error handling here; this partial function should
only match the successful case, JsonVariant.
* Address code review comments, thanks @S11001001
comment
* Address code review comments, thanks @S11001001
using `JsonVariant` for variant encoding/decoding
* Address code review comments, thanks @S11001001
replace `find` and `map` chain with collectFirst
* Update docs/source/json-api/lf-value-specification.rst
Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <scompall@nocandysw.com>
* sandbox: Create a monadic `ResourceOwner` to manage resources.
* sandbox: Rewrite `ResourceOwner` to be async.
* sandbox: Make sure failed resources are closed immediately.
* sandbox: Better naming in `Open`.
* sandbox: Rename `Open` to `Resource`, and open/close to acquire/release.
* sandbox: Convert `() => AutoCloseable` into `ResourceOwner`.
* sandbox: Refactor the LedgerApiServer in terms of resources.
* sandbox: Explicitly convert `() => AutoCloseable` to `ResourceOwner`.
Explicit > Implicit, right?
* sandbox: Create helpers for converting things to ResourceOwners.
Because I tried to start using them and there was so much code being
written at once.
* sandbox: Simplify construction of JdbcLedgerDao.
* sandbox: Releasing resources should be idempotent.
In that we should only do it once.
* sandbox: Fix the ResetService by closing the API services _first_.
They need to be shut down before the gRPC server.
* sandbox: Don't try and shut down PostgreSQL twice in tests.
* sandbox: Actually run the assertions in ResourceOwnerSpec.
Facepalm.
* sandbox: Test `Resource.sequence` more rigorously.
* sandbox: Move the helpers around `Resource` into `Resource.apply`.
* sandbox: Convert LedgerApiServer resource owners to classes.
* sandbox: Make `ResourceOwner` a monad too, delegating to `Resource`.
* sandbox: Turn `LedgerApiServer` into a ResourceOwner.
* sandbox: Simplify the public signature of `Resource.apply`.
* sandbox: Use ResourceOwners to simplify DB resource management.
This is one hell of a change. Sorry.
* sandbox: Try not to nest `Await.result` calls.
Causes issues when running in a `DirectExecutionContext`.
* sandbox: Turn index subscriptions into resources.
* sandbox: Fix warnings in RecoveringIndexerSpec.
* sandbox: Always release before recovering the indexer.
* sandbox: Add `flatten` and `transformWith` to `Resource`.
* sandbox: If releasing twice in parallel, the second should wait.
* sandbox: If the indexer recovers, clean up the old subscription.
* sandbox: Convert StandaloneIndexerServer into a resource owner.
* sandbox: Convert StandaloneApiServer into a resource owner.
* reference-v2: Rewrite ReferenceServer in terms of resources.
CHANGELOG_BEGIN
- [Reference v2] On an exception, shut down everything and crash.
Previously, the server would stay in a half-running state.
CHANGELOG_END
* sandbox: Rewrite SandboxServer in terms of resources.
* sandbox: Write the port file in a Future.
* sandbox: JdbcIndexer no longer needs to manage the actorSystem.
* sandbox: Shut down the LedgerApiServer when closing the Sandbox.
* sandbox: Rename `Resource.pure` to `Resource.successful`.
* sandbox: Rename `Resource.sequence_` to `sequenceIgnoringValues`.
* sandbox: Delete `CloseableResource`.
It's only used in once place. Just inline it.
* sandbox: `LedgerDao` no longer needs to be closeable.
* sandbox: Delete implicit materializers where they're not used.
* http-json: Wait for the Sandbox to start in tests.
* sandbox: Convert `scheduleHeartbeats` into a ResourceOwner.
* reference-v2: Explain why we steal ownership of the actor system.
* sandbox: Document why we only release resources once.
* sandbox: Add clues to ResourceOwnerSpec.
* http-json: Fix HttpServiceTestFixture to pass auth service through.
* codegen-sample-app: In ScalaCodeGenIT, wait for the server to start.
* Upgrade to Akka 2.6.1, akka-http 10.1.11 and Scala 2.12.10
Akka 2.6.1 Upgrade Changes
- Materializer in place of ActorMaterializer
- Source.future instead of Source.fromFuture
- The Scheduler.schedule method has been deprecated in favor of selecting scheduleWithFixedDelay or scheduleAtFixedRate
- onDownstreamFinish(cause: Throwable)
- ActorAttributes.supervisionStrategy(...) in place of ActorMaterializerSettings.withSupervisionStrategy
See https://doc.akka.io/docs/akka/current/project/migration-guide-2.5.x-2.6.x.html
* Akka 2.6.1 Upgrade Changes
- onDownstreamFinish(cause: Throwable)
See https://doc.akka.io/docs/akka/current/project/migration-guide-2.5.x-2.6.x.html
* code review: remove unnecessary supervision strategy
* Fixing a rare test failure,
two independent scalacheck Gens generate duplicate TemplateIds. Duplicate
in this context means having the same moduleName and entityName.
```
- TemplateIdMap.unique should not contain dups *** FAILED *** (102 milliseconds)
TestFailedException was thrown during property evaluation.
Message: None was not equal to Some(TemplateId(zy,n,s))
Location: (PackageServiceTest.scala:81)
Occurred when passed generated values (
arg0 = List(TemplateId(zy,n,s)),
arg1 = List(TemplateId(lj,n,s), TemplateId(g,n,s))
)
```
* Addressing code review comments, thanks @S11001001
* Addressing code review comments, thanks @SamirTalwar
* Minor cleanup
* sandbox: Move SandboxServer's helper classes to the companion object.
And make them `private`, `final`, and non-`case`.
* sandbox: Drop SandboxServer.apply and just call the constructor.
* sandbox: Move the SandboxServer#SandboxState class into the object.
Leave the `resetAndRestartServer` method behind, though.
* Lookup by Contract ID and Contract Key is WIP
* factor out "contract ID or key" JSON decoding
- adapted from fc132253 (#2695)
* Resolving conflicts
* Resolving conflicts
* Lookup by contract ID works
* Testing new contract created by IOU_Transfer can be looked up
* error if key and contractId specified for lookup at the same time
* Lookup by contract key test
* Lookup docs
* re-format with `./fmt.sh`
* minor cleanup
CHANGELOG_BEGIN
- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.
CHANGELOG_END
* first checkpoint for adding websocket
* unify shared method across websocketEndpoints and Endpoints using EndpointsCompanion objc
* add config for ws backpressure and logging
* add copy right header
* merge and change TODO comments
* resolve conflicts
* disable ws service for now to save merge conflicts while working on improvements
* Adding choice result to the exercise response, WIP
* Adding choice result to the exercise response, WIP
* Refactoring towards #3390,
ExerciseCommand argument does not always have to be a Record, changing
typearg: JsObject -> JsValue
* Cleanup
* exercise-with-result endpoint
* todo
* Switching /commands/exercise to use SubmitAndWaitForTransactionTree,
populating archived and created from TransactionTree
* removing debug println
* Fixing tests
* Removing `/command/exercise-with-result` endpoint
this one returns only exercise result, `/command/exercise` now returns
exercise result and events
* Updating docs
* Updating docs
CHANGELOG_BEGIN
- [JSON API - Experimental] Expose exercise result. Changed the output
of the ``/command/exercise``. Note ``exerciseResult`` and ``contracts``
in ``{"status":200,"result":{"exerciseResult": ...,"contracts":[...]}``.
See #3314
CHANGELOG_END
* toSqlWhereClause WIP
* literal cases for SQL predicate generation
* fill in the remaining Literals' sql-equal data
* add other likely elements of the toSqlWhereClause fold
* SQL ListMatch case
* SQL VariantMatch case
* partial SQL RecordSubset case
* SQL Range case
* comments on JSON encoding for DB
* new relationship for the 3 paths in toSqlWhereClause Rec
- conversion to Fragment is further delayed to allow mixed-mode matching
of records
* handle new Rec semantics in ListMatch (can't drop @> on the floor anymore)
* compile RecordSubset to SQL
* compile MapMatch to SQL
* note optimization for record & map
* optimize = when @> unavailable for record subsets
* optimize range when degenerately =
* don't discard the @> safety of empty test sets
* unnested SQL optional matching
* converting DB JSON to response body JSON
* compiling nested optionals to SQL
* add missing length check to ListMatch
* remove unneeded parens from generated predicates
* remove 1 = 1 leader from generated predicates
* test the generated SQL from toSqlWhereClause
* searchDb WIP
* searchDb integrated
* coerce party to text in selectContracts; log that query
* fixing query
* fixing scala formatting
* removing unused functions
* removing unused type alias
* checking a that search returned exactly what we searched for,
also checking that all contracts got stored in the DB
* factor commonalities of MapMatch and RecordSubset
* cleanup
* cleanup
* changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Queries will always run against Postgres if Postgres is
configured. See `issue #3388 <https://github.com/digital-asset/daml/issues/3388>`_.
CHANGELOG_END
* fix record =-unsafe detection
* Spin off TokenHolder into a new library
Avoids having weird dependencies between different packages, makes TokenHolder available on Maven
* Fix auth-utils path
* Error handling improvements,
partitioning the Soruce[Error \/ JsValue], folding all errors and
producing the final status and errors element based on the above fold
* Test case + fixes,
for some reason GeneratorDrivenPropertyChecks does not like AsyncFreeSpec
* changing the order of elements in the response,
would be better if we were checking the JSON objects not JSON strings.
* Fixing the GET contracts/search endpoint,
Returning all active contracts for all known templates, skipping the
query store persistence.
* minor cleanup
* Start moving all the jars into a single jar.
* Fold navigator into daml-sdk jar
* include sandbox
* Remove unnecessary compileDeps.
CHANGELOG_BEGIN
- [DAML SDK] Reduced the size of the DAML SDK by about
60% uncompressed, 70% compressed, by deduplicating Scala
dependencies.
CHANGELOG_END
* update copyright header
* buildifier fix
* Changing search so it returns `Source[ActiveContract]`
* wip
* function to convert Source[JsVal] into result Source[ByteString]
* compiles now
* cleanup
* tests passing
* test case for contracts search streaming error handling
* in memory search relying on acsFollowingAndBoundary, so we fetch all `following` updates
* Using ContractsFetch.acsFollowingAndBoundary
* Addressing code review comments, thanks @S11001001
CHANGELOG_BEGIN
[DAM-LF Interface Reader]: **Rename** ``PrimTypeMap`` to ``PrimTypeTextMap`` and ``PrimType.Map`` to ``PrimType.TextMap``
CHANGELOG_END
Closes#3627
- Pass a token at startup to read packages
- Re-read the token every time new packages are fetched to ensure token
freshness
- If the token is expired, new packages will not be retrieved
CHANGELOG_BEGIN
- [JSON API] Accept a path to a file containing a token at startup for
package retrieval. See `issue #3627 <https://github.com/digital-asset/daml/issues/3627>`__.
CHANGELOG_END
* build a single graph to replace the two-ConnectionIO setup
- readOffsetFromDbOrFetchFromLedger and contractsFromOffsetIo duplicate
some CIO work; we can cat the ACS and txns into a single stream and
treat them once
- also useful for in-memory query
* make contractsFromOffsetIo fetch ACS if at begin; stop using contractsToOffsetIo
* remove another unused function; comment transactionsFollowingBoundary
* factor out last flow
* replace JSON witnessParties column with a PG text[] column
* notes about the concurrent behavior of updateOffset
* include witness party in selectContracts query
* fmt
* fix witness_parties fetching in http-json tests
* release note
* typo in prior release note
* move new release note to bottom
* StaticContentEndpoint
* cleanup
* release notes
* Add test
* SDK doc update
* Copying the directory content explicitly
to avoid creating a symlink, I believe that is the cause of the Windows issue
* creating a static content dir from the test
* fixing release notes
* creating a tmp dir
* fixing release notes
* Using Gen.Identifier to generate random strings
* Don't duplicate dependencies on `@postgresql_dev_env` binaries.
If you depend on `@postgresql_dev_env//:all`, you don't need anything
else.
* ledger-api-test-tool: Remove PostgreSQL dep from conformance tests.
It's already a dependency of the server.
* comparison query parser given scalar parser
- written in half-error-propagation style to better suit other potential
error features
* factor dupes in RangeExpr
* text range parsing
* interpreting Range into in-memory predicate; points out bad dedupe from earlier
* make reuse of the scalar extractors much nicer
* express date, time, int64 as factored-out range exprs
* express numeric as factored-out range expr
* factor \&/ usage
* refactor LF value extractors for reuse in range queries
* factor mkRange usage
* totally deconstruct the int64 and text cases
* totally deconstruct the date and timestamp cases
* totally deconstruct the numeric case
* document comparison queries
* use Utf8.Ordering for text comparison queries
* int64 range query tests
* more int64 range query tests
* date, string, numeric range query tests
* include line # in query test successes table
* timestamp range query tests
* add release note
* remove duplicate changelog entry from #3425
* Retry on UNIQUE_VIOLATION
* Update release notes
* Hiding method that is not supposed to be used directly
* using connection.raiseError
* Force re-run on stale offset update
* bazel: 0.28.1 --> 1.1.0
* bazel-watcher sha256
* Fix missing line in patch
* proto_source_root --> strip_import_prefix
See https://github.com/bazelbuild/bazel/issues/7153 for details.
* Update rules_nixpkgs
Required to avoid errors of the form
```
ERROR: An error occurred during the fetch of repository 'node_nix':
parameter 'sep' may not be specified by name, for call to method split(sep, maxsplit = None) of 'string'
```
and
```
ERROR: An error occurred during the fetch of repository 'node_nix':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
_execute_or_fail(repository_ctx, <3 more arguments>)
File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
fail(<1 more arguments>)
Cannot build Nix attribute 'nodejs'.
Command: [/Users/runner/.nix-profile/bin/nix-build, /private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/node_nix/nix/bazel.nix, "-A", "nodejs", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
src/main/tools/process-tools.cc:173: "setitimer": Invalid argument
```
* Update rules_scala
* .proto has been removed, use [ProtoInfo] instead
See
https://docs.bazel.build/versions/1.1.0/be/protocol-buffer.html#proto_library
* python3_nix add nix_file attribute
To avoid the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/BUILD:66:1: //:nix_python3_runtime depends on @python3_nix//:bin/python in repository @python3_nix which failed to fetch. no such package '@python3_nix//': Traceback (most recent call last):
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
_execute_or_fail(repository_ctx, <3 more arguments>)
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
fail(<1 more arguments>)
Cannot build Nix attribute 'python3'.
Command: [/home/aj/.nix-profile/bin/nix-build, "-E", "import <nixpkgs> { config = {}; overlays = []; }", "-A", "python3", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
error: anonymous function at /home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs.nix:3:1 called with unexpected argument 'config', at (string):1:1
```
* rules_haskell unnamed string.split(_, maxsplit = _)
The keyword argument may no longer be named.
* string.replace(_, _, maxsplit = _) may not be named
* Move proto sources from deps to data
Fixes
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/daml-lf/archive/BUILD.bazel:150:1: in deps attribute of scala_test rule //daml-lf/archive:daml_lf_archive_reader_tests_test_suite_src_test_scala_com_digitalasset_daml_lf_archive_DecodeV1Spec.scala: '//daml-lf/archive:daml_lf_1.6_archive_proto_srcs' does not have mandatory providers: 'JavaInfo'. Since this rule was created by the macro 'da_scala_test_suite', the error might have been caused by the macro implementation
```
* Define sha256 for haskell_ghc__paths
Bazel 1.1.0 fails on missing hashes.
* Disable --incompatible_windows_native_test_wrapper
* //compiler/daml-extension don't modify sources
Modifying sources in-place can cause issues on Windows, where build
actions are not sandboxed and changes on sources can affect other build
steps.
* bazel-genfiles --> bazel-bin
The bazel-genfiles symlink has been removed since Bazel 1.0.
See https://github.com/bazelbuild/bazel/issues/8651
* Mark dev_env_tool repository rule as configure
See
https://docs.bazel.build/versions/1.1.0/skylark/lib/globals.html#repository_rule
* Move data deps into data attribute
* Mark dev_env_tool as local = True
* Manually fetch @makensis_dev_env