Commit Graph

8479 Commits

Author SHA1 Message Date
Gary Verhaegen
b8937ad81b
ci: self-service compat test start (#11853)
It should now be possible for anyone to trigger the daily compat build
by adding a `run-full-compat: true` trailer to their commit message.

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true
2021-11-24 18:05:04 +00:00
Gary Verhaegen
de8d15fb1e
fix Nix install on macOS nodes (#11696)
As part of the 2.4 release, the Nix installer has been changed to take
care of the volume setup (which we don't want it to do here). Because
that requires root access, they've decided to make multi-user install
the default, and to disable single-user install.

We could do an in-depth review of the difference and adapt our setup to
use a multi-user setup (we do use the multi-user setup on Linux, so
there's precedent), but as an immediate fix, we can keep our single-user
setup _and_ get the latest Nix by using the 2.3.16 installer and then
upgrading from within Nix itself. This _should_ keep working at least
for a while, as Linux still defaults to single-user.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 18:53:13 +01:00
Stefano Baghino
b3d1d40b50
Expose submissionId via the Java bindings (#11839) (#11847)
* Expose submissionId via the Java bindings

Closes #11705

Will need to be forward-ported to `main` once merged.

changelog_begin
[Java Bindings] submissionId is now exposed via the bindings, see issue #11705
changelog_end

* Address https://github.com/digital-asset/daml/pull/11839#discussion_r755445100
2021-11-24 17:38:56 +01:00
Remy
86da6e8eef
LF: Test scala interface type checking (#11833)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 15:58:45 +00:00
Gary Verhaegen
5f52f00afb
increase linux cluster size (#11860)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 15:18:56 +00:00
Sofia Faro
5c12d757f4
Add a guard when exercising by interface. (#11836)
* Add a guard when exercising by interface.

This fixes part of #11703, when exercising an inherited choice by
interface and you know the template id, via the command preprocessor.

It does this by inserting a "guard" in between the interface fetch and
the exercise body. The guard is a function Interface -> Bool, which
is general enough to check the template id, without complicating too
much in speedy. And can be generalized in the future to check more,
like signatories, etc.

I added the guard as an optional argument to UExerciseByInterface.
This isn't hooked up to the protobuf AST yet (or Haskell side for
that matter) -- but I'll do it in the next PR! For now you can invoke
the guarded exercise via the command preprocessor, so I can enable the
approprate engine tests. (There's still some failing fetch tests left,
but I decided to leave this for later. Fetch can be a lot simpler than
guarded choices, since you always add a fetch node. No need for fancy
continuations.)

changelog_begin
changelog_end

* scalafmt

* Feedback and fix matches

* Update comments, we are always going to abort the transaction

* Raise WronglyTypedContract in SBGuardTemplateId.

* rebase and fix parser

* restore ANF

* scalafmt
2021-11-24 14:22:40 +00:00
fabiotudone-da
7c3a2a7801
Add a new KV submission failure error (#11854)
CHANGELOG_BEGIN
[Integration Kit] Add a new SUBMISSION_FAILED internal error
CHANGELOG_END
2021-11-24 13:10:36 +00:00
Robert Autenrieth
aebc5a734f
All packages must be valid (#11850)
changelog_begin
changelog_end
2021-11-24 13:10:27 +00:00
nickchapman-da
0374843143
speedy compilation benchmark (#11852)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 13:10:18 +00:00
Remy
393893a601
LF encoder: make package validation optional (#11849)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 13:53:52 +01:00
Robert Autenrieth
25b476fdb2
DPP-726 Add string interning unit tests (#11841)
* DPP-726 Add string interning unit tests

changelog_begin
changelog_end

* Add more test cases
2021-11-24 13:38:38 +01:00
nicu-da
59eb0d2eff
kvutils - For duplicate command rejections, add the submission id as metadata [KVL-1175] (#11848)
changelog_begin
kvutils - For duplicate command rejections, the submission id of the already accepted transaction is returning as part of the gRPC metadata. The submission id will be included under the key `existing_submission_id`.
changelog_end
2021-11-24 04:32:34 -08:00
nickchapman-da
970243dd46
Ensure stack-safety during closure-conversion. (#11778)
ClosureConversion -> Suffix with "Old"

CHANGELOG_BEGIN
CHANGELOG_END

ClosureConversion old-vs-new diff check

ClosureConversionNew, first cut. All tests in SBuiltinTest work.

In addition we change some Array --> List in SExpr1 (for human pp).
And we throw away ClosureConversionDup.

adapt AnfTest from Array to List change for SExpr1

all tests pass in daml-lf/interpreter

remove SExpr0.SELet1General

reorder things

testing for stack-safety of closure conversion

file/class renames

improve naming

pass cont as sep arg to commit (move out of Up/Down)

comment stack-safe closure conversion

fix bug: failed to use env1

fix 2x unmoored doc comment

comment stack safety testing

Remove old closure-conversion code & diff-check between old/new.

loose StackSafe suffix on ClosureConversion class/file

rename StackSafetyTest.scala to ClosureConversionTest.scala

prefer "sealed abstract class" to "sealed trait"

fvs.zipWithIndex --> fvs.view.zipWithIndex

(SExpr1) SEAppGeneral -> SEApp; prefer List to Array in SEApp/SECase

prefer xs.toArray to Array(xs: _*)

access SExpr0 via "source."

two more .view

improve comment and fix typo

link to Issue

switch to a continuation stack; avoids nesting in the Cont type
2021-11-24 11:47:39 +00:00
nickchapman-da
e63c80dddd
update LATEST (#11846)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-24 11:18:34 +00:00
Hubert Slojewski
db425216d1
libs-scala: Change SourceQueueResourceOwner to BoundedSourceQueueResourceOwner [KVL-1177] (#11832)
CHANGELOG_BEGIN

- [Integration Kit] `SourceQueueResourceOwner` has been renamed to `BoundedSourceQueueResourceOwner` and takes a `BoundedSourceQueue` from now on

CHANGELOG_END
2021-11-24 12:02:19 +01:00
Hubert Slojewski
109b60613c
Make the InstrumentedSource.queue use the BoundedSourceQueue [KVL-1177] (#11807)
CHANGELOG_BEGIN

- [Integration Kit] InstrumentedSource.queue.offer no longer returns a Future

CHANGELOG_END
2021-11-24 11:26:39 +01:00
Robert Autenrieth
bd2a6852ee
Make ACS reader parameters configurable (#11732)
changelog_begin
changelog_end
2021-11-23 21:48:02 +01:00
tudor-da
329e609ec4
[Self-service error codes] Group explanations (#11715)
* [Self-service error codes] Error group descriptions

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

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

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-23 20:30:33 +00:00
Moritz Kiefer
32e9c4b13a
Bump go rules (#11829)
* Bump go rules

Was debugging something else and this seemed simple enough to factor
it out.

changelog_begin
changelog_end

* Bump Bazel on Windows

changelog_begin
changelog_end

* bump bazel manifest

changelog_begin
changelog_end
2021-11-23 18:58:55 +00:00
azure-pipelines[bot]
6df7af7544
update compat versions for 1.18.0-snapshot.20211117.8399.0.a05a40ae (#11743)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-23 18:13:57 +01:00
pbatko-da
9461702309
[DPP-673][Self-service error codes] Split one narrow migration table into multiple narrower ones to fit in the generated pdf's pages. (#11803)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 17:38:31 +01:00
pbatko-da
55191847cd
[DPP-673][Self-service error-codes] Generate error code directory compatible with both pdf and html docs (#11794)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 15:30:48 +01:00
Moritz Kiefer
5a2c070da4
Skip append-only migration tests on each PR (#11816)
fixes #11760

changelog_begin
changelog_end
2021-11-23 15:00:50 +01:00
Stephen Compall
e6c8229594
port #11798 documentation changes to json-api HTTP codes documentation (#11823)
- see c4b6a17da1

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 13:16:46 +00:00
Remy
1610d977dc
LF: parsing interface primitives (#11825)
Continue work start in #11797

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-23 12:03:03 +00:00
mziolekda
f2aa09c114
Allow encoded server key files to be in base64 [DPP-761] (#11796)
* Allow encoded server key files to be in base64

CHANGELOG_BEGIN
CHANGELOG_END

* format

* dry tests
2021-11-23 09:49:52 +00:00
azure-pipelines[bot]
cc3f551030
update NOTICES file (#11824)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-23 08:30:31 +01:00
tudor-da
1bfcbc978b
Refactoring for Canton compatibility on PackageServiceErrors (#11812)
* Refactoring for Canton compatibility on PackageServiceErrors
* ErrorResource.all is public for accessibility from Canton

CHANGELOG_BEGIN
CHANGELOG_END

* Keep PackageServiceError object
2021-11-22 19:14:03 +00:00
tudor-da
c4b6a17da1
[Self-service error codes] Update existing error code references [DPP-593] (#11798)
* Updated Ledger API services protobuf definitions

CHANGELOG_BEGIN
CHANGELOG_END

* Adapted Building Applications / Ledger API / gRPC section

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

* Small rewording Error codes page

* Updated outdated LedgerAPI / gRPC page

* Apply suggestions from code review

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

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

* Updated outdated LedgerAPI / gRPC page

* Addressed review comments

* Addressed review comments

* Remove unnecessary link to error-codes

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

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-22 18:39:25 +00:00
Moritz Kiefer
addb2edc03
Drop Scala 2.13 version guards from Bazel definitions (#11819)
changelog_begin
changelog_end
2021-11-22 17:37:49 +00:00
Moritz Kiefer
5785bbfcfd
Drop LF < 1.14 from supported damlc output versions (#11701)
* Drop LF < 1.14 from supported damlc output versions

fixes #11319

We keep test coverage by depending on the most recent snapshot which
still has 1.14 support.

changelog_begin

- [Daml Compiler] Damlc can only produce Daml-LF 1.14 or
  newer. Passing aynthing older to `--target` is an error. If you
  need to produce older versions, use an older SDK.

changelog_end

* Switch around legacy_compiler_lf_versions

changelog_begin
changelog_end

* drop since-lf

changelog_begin
changelog_end
2021-11-22 16:20:17 +00:00
Remy
ae8391ee01
LF Parser: handle interface (#11797)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-22 14:49:02 +01:00
nicu-da
faddba4222
Increase range for excluded snapshots in compatilbility tests (#11802)
changelog_begin
changelog_end
2021-11-22 05:43:53 -08:00
Sofia Faro
f8933d1f4b
Make lookupTemplateChoice return only choices in the template. (#11808)
This fixes a bug in the typechecker (#11558) and the command
preprocessor, since those were written with this behavior of
lookupTemplateChoice in mind. Enables the engine test that
caught this.

changelog_begin
changelog_end
2021-11-22 13:27:48 +00:00
azure-pipelines[bot]
3e0ac71e99
update NOTICES file (#11801)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-22 12:29:39 +00:00
tudor-da
8e31e8e6a8
[Self-service error codes] Enabled by default [DPP-691] (#11685)
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)

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

* Adapted HttpServiceIntegrationTest

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

* Fix Daml Script tests

changelog_begin
changelog_end

* Fix Repl functests

changelog_begin
changelog_end

* Fix haskell binding tests

changelog_begin
changelog_end

* Fix CommandClientIT test

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

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

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

* Remove useless flags sandbox-classic

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

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

* Compatibility mode for old test tools

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

* Apply suggestions from code review

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

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-22 12:26:48 +00:00
Gary Verhaegen
ab520fbc51
Fix es (#11784)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-22 11:41:10 +01:00
Moritz Kiefer
350ad983ea
Bump Windows postgres (#11804)
The old URL returns a 404 now

changelog_begin
changelog_end
2021-11-22 10:38:54 +00:00
azure-pipelines[bot]
2d60ae813c
update NOTICES file (#11799)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-20 08:44:47 +01:00
nicu-da
2d9ee2078f
[ledger-api-client] - Do not account for deduplication_time as timeout [KVL-1172] (#11791)
changelog_begin
ledger-api-client - The default command tracking timeout is no longer influenced by the deprecated deduplication_time as a deduplication period. Previously if no timeout was being set in the command and deduplication_time was set as the deduplication period then the command tracking timeout was the minimum between the deduplication_time and max tracking timeout.
changelog_end
2021-11-19 18:23:27 +00:00
Remy
f33486154f
LF: Simplify LF Syntax (#11795)
- Do not wrapped choices in `choices { ... }`
- use sytematic `;` after choice component instead of ',`

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-19 17:23:36 +01:00
Remy
cbe9c922ba
LF: Clean up Ast (#11786)
- rename non-default builders `apply` to `build`
  * avoid confusing both
  * make explicit the build can crash

- make interfaceId and templateId fields consitent

- use when possible named arguments

- check for non-repetition of inherited choices

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-19 15:40:28 +01:00
nicu-da
25e5bbb753
kvutils - Removed unused setting from conformance tests [KVL-1174] (#11785)
kvutils - The deduplication period is no longer overwritten by the max deduplication duration, therefore there is no need to change the default max deduplication duration

changelog_begin
changelog_end
2021-11-19 05:41:45 -08:00
Stefano Baghino
cd52f13464
Remove @aherrmann-da from CODEOWNERS (#11792)
changelog_begin
changelog_end
2021-11-19 14:27:02 +01:00
azure-pipelines[bot]
9bb12d0eec
update NOTICES file (#11787)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-19 14:14:17 +01:00
Moisés Ackerman
d23d113667
Restructure interface desugaring (#11555)
* Update ghc patch

* Replace Implements proxy datatype with a class

* Expose 'Implements' class in Prelude

* Add DA.Internal.Desugar.HasMethod class

This allows us to get the type of a method of an interface through the functional dependency

* Convert interfaces from new desugaring

* Update Interface daml-test-file to use Interface class functions

* Update InterfaceDesugared daml-test-file

* Replace remaining uses of Is<Interface> methods with Implements

* Document HasMethod, Method and mkMethod

* Ignore _method_ bindings in convertBind

* Ignore interface desugaring types/classes/instances/functions in LF conversion

* update snapshot after pin on windows

changelog_begin
changelog_end
2021-11-19 10:06:49 +01:00
Remy
1bb2fc28a3
LF: Simplify transaction versionning for interface (#11744)
We revert #11626, and just change the way transaction version is
computed:

- As before, Node version is calculated from the
  package of the template ID action.

- Transaction version is the max of the version of all the nodes,
   instead of the root nodes.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 22:46:46 +01:00
Marton Nagy
4b59c5731c
Move select DB logic to JVM [DPP-760] (#11777)
* Move select logic which was previously added as select expressions to Scala calulation, and exposing needed data on the queries

changelog_begin
changelog_end
2021-11-18 21:36:15 +01:00
Andreas Herrmann
5fb5784970
Limit the number of parallel Bazel actions (#11779)
Limit the number of parallel actions spawned by Bazel to the number of
physical CPUs. (Assuming a CPU with hyperthreading enabled)

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-18 18:32:33 +00:00
mziolekda
a9754fe7d2
Write exception reports into the logfile in case of ssl misconfiguration (#11776)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 18:25:59 +00:00