Commit Graph

9415 Commits

Author SHA1 Message Date
Victor Peter Rouven Müller
e1ccc2f4f4
duplicate json-api tests for full-lifecycle user token testing (#12922)
* WIP

* First version that compiles (with debug print statements)

* Revert changes on the failure tests

* Make all tests pass with some major cleanup of the new code

* Remove debug prints & outcommented code

* Make decoding / encoding test also compatible with user token tests

changelog_begin
changelog_end

* Minimize diff

* Fix oracle tests

* leave note for followup

* Update ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-01 11:05:58 +00:00
azure-pipelines[bot]
3ebce2fdee
update NOTICES file (#13104)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-01 09:26:05 +01:00
Stefano Baghino
ef8a0e662d
Describe the behavior of different token formats in the HTTP JSON API (#13082)
Fixes #12440

changelog_begin
changelog_end
2022-02-28 17:15:21 +00:00
Sofia Faro
db100c131a
Prevent iface choice & method name collisions. (#13075)
* Prevent iface choice & method name collisions.

This PR adds interface choices and methods to the name collision checker.

changelog_begin
changelog_end

* check the names from interfaces

* add error

* implement name collision check in scala side

* scalafmt
2022-02-28 13:21:41 +00:00
Moisés Ackerman
7af4215261
Interfaces accept at most a single ensure clause (#13093)
* Add test for multiple ensure declarations in interface

* update ghc patch

* Update expected result for daml-doc interface test

changelog_begin
changelog_end
2022-02-28 14:12:40 +01:00
Remy
5616846a7f
LF: Factorize logic to compute contract meta data (#13080)
between Create and Fetch.

meta data includes, signatories, observers, and contract key.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-28 12:02:33 +01:00
Moritz Kiefer
8a7aaa0c3d
Fix Windows linking issues (#13097)
I have to admit I still fdon’t fully understand why this sometimes
fails and sometimes doesn’t. It looks like some caching issue is
involved (e.g. currently builds in /d/a/2 succeed while builds in
/d/a/1 succed) but I’m not entirely sure that’s all.

This PR tries to address this in two ways:

1. Add the library when linking the Haskell bits instead of only on
the C library. I think this is required since we the final Haskell
binary is linked against the static cbits which does not carry a
reference to bcrypt but I’m not completely sure.
2. Rename the target to avoid interference with builds from before the
grpc upgrade. I suspect what is happening is that due to the lack of
sandboxing we sometimes end up picking up that library if it is in the
build tree from an older build instead of the new one.

changelog_begin
changelog_end
2022-02-28 08:35:30 +01:00
Moritz Kiefer
1783146c9e
Release new 2.0.0 RC (#13096)
changelog_begin
changelog_end
2022-02-25 20:36:26 +00:00
Moritz Kiefer
7b95a6f9c6
Bump ghcide to include SInitialized fix (#13086)
includes
0572146d4b

not going to backport this

changelog_begin
changelog_end
2022-02-25 20:20:14 +01:00
Stephen Compall
7c1cf567ad
use user token for trigger service sandbox test fixture (#13077)
In SandboxFixture when mixing in the auth middleware fixture, set
up the ledger client with a user token instead of a claims token
when not running in the claims-token-specific auth tests.

Fixes #12831.

* note about inClaims

* prevent Product, Serializable warts with AuthServiceJWTPayload

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-25 14:08:44 -05:00
pbatko-da
d5bfefbc00
[User management] Use collate "C" for Postgres and add test for collation for all backends. [DPP-908] (#13084)
In Oracle it should pass as our tests use an image that has NLS_LANG='American' which implies NLS_SORT='BINARY'

changelog_begin
changelog_end
2022-02-25 18:12:35 +01:00
davidrichards-da
23dd7c3303
Removed two links (#13092)
CHANGELOG_BEGIN
CHANGELOG_END

Removed two links from identity and package management and overview.
2022-02-25 16:05:10 +00:00
Moritz Kiefer
49e04c11c6
Fix dependencies for create-daml-app (#13089)
No reason to incldue daml-trigger by default.

changelog_begin
changelog_end
2022-02-25 15:25:50 +00:00
davidrichards-da
585f695eb8
Adding an installing daml enterprise link (#13088)
CHANGELOG_BEGIN
CHANGELOG_END

Adding an installing daml enterprise link to help with the Canton Docs
2022-02-25 15:20:07 +00:00
Robin Krom
3692a4a565
interfaces:ensure that implementations are ordered (#13071)
* interfaces:ensure that implementations are ordered

We make sure that the implementations are ordered by insertion in the
Scala AST. This is important to guarantee an evaluation order of the
interface preconditions that is determined by the order of interface
implementations of a template.

CHANGELOG_BEGIN
CHANGELOG_END

* use VectorMap instead of ListMap
2022-02-25 15:14:50 +00:00
Moritz Kiefer
c09e1d4b96
Document user management support in Navigator (#13085)
* Document user management support in Navigator

fixes #12934

changelog_begin
changelog_end
2022-02-25 16:11:51 +01:00
Simon Maxen
f67e9d4d49
Perform transaction metering aggregation inside DB (#13083)
changelog_begin
changelog_end
2022-02-25 13:37:38 +00:00
davidrichards-da
5dd6accb08
Adding a link to Daml Intro (#13074)
* Adding a link to Daml Intro

Adding a link to Daml Intro for Canton to link to.  Canton changes being made to link to this in the same docs, rather than the external links.

* Blank commit

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-25 13:05:20 +00:00
Moritz Kiefer
5dfc2e4a98
Fix GSG to account for login requirement (#13073)
* Fix GSG to account for login requirement

You can only follow a user after they logged in so the previous order
did no longer work.

changelog_begin
changelog_end

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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

* fix borked sentence

changelog_begin
changelog_end

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-02-25 13:07:56 +01:00
Simon Maxen
728f03c855
Participant metering documentation (#13070)
* Participant metering documentation

changelog_begin
Participant metering added to Daml operating insturctions documentation
changelog_end
2022-02-25 10:59:20 +00:00
Moritz Kiefer
db61c7c3ee
Bump Canton to latest snapshot (#13079)
Slightly worried that some last minute change will break daml-helper
before 2.0 so upgrading to catch any issues early.

changelog_begin
changelog_end
2022-02-25 09:26:45 +00:00
Moritz Kiefer
4699201a13
Fix Window linker errors (#13078)
Apparently https://github.com/digital-asset/daml/pull/13066 resulted
in linker errors but only on clean builds (I think). I don’t fully
understand why. The requirement from bcrypt seems to come from the
grpc upgrade but reverting that still leaves undefined symbol errors
to DbgHelp. Don’t really care enough to track it down given that this
fixes it.

changelog_begin
changelog_end
2022-02-25 10:14:08 +01:00
Moritz Kiefer
9dee577138
Document ToC doc updates (#13069)
changelog_begin
changelog_end
2022-02-25 08:53:01 +01:00
Stephen Compall
786906f23b
enable oauth2-test's user tokens in trigger service tests (#12994)
Duplicates the trigger service's auth tests for the two modes of
the oauth test server from #12929, then selects out the
claim-token-dependent tests as explained in
https://github.com/digital-asset/daml/issues/12831#issuecomment-1048176312

Part of #12831.

* also suppress claims-only tests in oracle-with-oauth2-test

* use inClaims for several tests

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-24 12:41:47 -05:00
Sofia Faro
0e03e2f100
Add interfaces to LF spec (#13020)
* Add interfaces to LF spec.

Part of #11349. This PR adds the interface & implements declarations, deals with "requires", and name collisions. I'm leaving expression types and operational semantics to a future PR.

changelog_begin
changelog_end

* missing curly

* change T to I for interfaces

* revisions from Remy
2022-02-24 17:09:20 +00:00
Moritz Kiefer
0ea4866adc
Fix activeness display in script service (#13059)
The previous way of tracking this only worked for direct children of
rollback nodes but lost the information when there was an exercise
node in between.

Reported in https://discuss.daml.com/t/exception-rollback/4000

changelog_begin

- [Daml Studio] Fix a bug where contracts that have been rolled back
  would still show up as active in the table view and in the list of
  active contracts at the end of the transaction view. This only
  affected display. Fetching those contracts failed and `query` also
  did not return those contracts.

changelog_end
2022-02-24 16:20:00 +01:00
carrielaben-da
55590d916b
Update app-architecture.rst (#12993)
* Update app-architecture.rst

Second-iteration changes to the App Architecture page, addressing User Management and the Alias contract.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

* Update app-architecture - edits - 1

Which/ how many additional details about the public party do you want to include here? Or as another option, should it be explained in-depth elsewhere?

[CHANGELOG_BEGIN]
[CHANGELOG_END]

* Update docs/source/getting-started/app-architecture.rst

Adding Moritz's suggested changes

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/app-architecture.rst

Changed to Moritz's suggested wording.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/app-architecture.rst

Adding Moritz's suggestion w/link.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-24 10:18:40 -05:00
Moisés Ackerman
58132cf71c
Fix data-deps orphan imports without explicit packageRefs (#13055)
* Include orphan instance imports in buildLfPackageGraph

* Add failing test for cross-DAML-LF version data-deps with stdlib orphan instances

* Add failing test for cross-DAML-LF version data-deps with custom orphan instance

changelog_begin
changelog_end
2022-02-24 15:03:10 +01:00
davidrichards-da
0ed1e0526b
Moving the 'testing your web app' page to the GSG (#13060)
* Moving the 'testing your web app' page to the GSG

CHANGELOG_BEGIN
CHANGELOG_END

Moving the 'testing your web app' page to the GSG

* Updating paths after moving the file

Updating paths after moving the file

* Adding the testing page to the pdf file too.

* Adding a link to the user management description

CHANGELOG_BEGIN
CHANGELOG_END

Adding a link to the user management description

* fixing link in first-feature linking to the moved page

fixing link in first-feature linking to the moved page

* Updating a link to the testing file

Updating a link to the testing file
2022-02-24 13:00:48 +00:00
Moritz Kiefer
267526b627
Fix MacOS GHCi issues (#13066)
The trick is extremely simple actually, see the comment for details.
Pretty embarassed that it took me this long to figure it out but
better late than never I guess.

I also upgraded grpc to match our java version and dropped the comment
to keep it in sync with the nix version which we hopefully never need
now. Not strictly required but seemed nice to do at the same time.

changelog_begin
changelog_end
2022-02-24 12:26:27 +00:00
davidrichards-da
0583b1879f
Updating the GSG architecture diagram (#13067)
CHANGELOG_BEGIN
CHANGELOG_END

Updating the GSG architecture diagram
2022-02-24 12:02:24 +00:00
Moritz Kiefer
bd1ae4cae7
Enable html4 writer in sphinx (#13056)
The sphinx update switched to an html 5 writer by default which broke
a bunch of our CSS which I unfortunately missed. While that is
definitely fixable, a few days before our 2.0 release this doesn’t
seem sensible to focus on so for now let’s force the html4 writer.

changelog_begin
changelog_end
2022-02-24 12:27:02 +01:00
Stefano Baghino
21769eaff5
Move Daml Helm Chart and Auth0 setup pages to early access (#13052)
Add a disclaimer that these pages do not work with Daml 2.0
but are under active development.

Closes #13038
Closes #13039

changelog_begin
changelog_end
2022-02-24 10:51:08 +00:00
Robert Autenrieth
d5a4aea3a7
Fix broken test logback (#13063)
changelog_begin
changelog_end
2022-02-24 10:28:56 +01:00
azure-pipelines[bot]
334f49602f
update NOTICES file (#13064)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-02-24 07:04:00 +00:00
Gary Verhaegen
fe9d44ffe7
ci: bump Nix on macOS nodes (#13061)
However that happened, we were stuck with Nix 2.3.15 (or 2.3.16 in some
cases) on our macOS nodes. This PR is a minor edition to the Nix
initialization commands to switch from 2.4 to "latest", but I wil lalso
use it to record the changes I just did manually to the cluster.

The cluster is currently composed of two parts:
- 7 machines running Catalina (10.15.7).
- 1 machine running Monterey (12.2).

Unfortunately they use different setup. The Catalina ones are described
by the state of the repo (in theory, though keeping them in sync is
manual); in order to update those, I have:

1. Taken one node off the CI pool (`builder1epjj7`).
2. On that node, run the following commands:
   ```
   cd ~/daml/infra/macos/3-running-box
   vagrant destroy -f
   rm ~/images/*
   vagrant box remove macinbox
   vagrant box remove azure-ci-node
   rm -r ~/.vagrant.d/boxes/macinbox-06032020.tar.gz
   softwareupdate -d --fetch-full-installer --full-installer-version 10.15.7
   cd ~/daml/infra/macos/1-create-box
   sudo macinbox --box-format vmware_desktop --disk 250 --memory 32768 --cpu 10 --user-script user-script.sh
   cd ../2-common-box
   vagrant up
   vagrant package --output ~/images/initialized-$(date +%Y%m%d).box
   vagrant destroy -f
   cd
   ./run-agent.sh
   ```
   This leaves us with that node running an updated box. The new box is
   in `~/images/initialized-$(date)`.
3. Send that file to all the other nodes with `scp`.
4. Reboot all the nodes (after deactivating & waiting for jobs to
   finish).

For the Monterey node, images (steps 1 and 2 in this repo) are currently
created by @nycnewman on another machine I don't have access to, so I
took a slightly different approach: I took the existing image, started
it from the `3-running-box` folder as usual, manually updated Nix there,
then repackaged that.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-24 01:04:28 +00:00
Jennifer Whyte
2f86d8d37c
Update ledger overview list (#13030)
* Update ledger overview list

CHANGELOG_BEGIN
CHANGELOG_END

* Update deploying.rst

CHANGELOG_BEGIN
CHANGELOG_END

* Update deploying.rst

fixing typo

CHANGELOG_BEGIN
CHANGELOG_END

* Update app-arch.rst

Remove link to deleted page

* Update packages.rst

Remove more links to deploy page

CHANGELOG_BEGIN
CHANGELOG_END

* Update authorization.rst

changelog_begin
changelog_end

* Update packages.rst

Adding links back

CHANGELOG_BEGIN
CHANGELOG_END

* Update packages.rst

link fix

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/daml/reference/packages.rst

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-23 16:03:23 -05:00
Robert Autenrieth
e01c8394e9
Do not run oracle migration tests on macOS (#13047)
* Do not run oracle migration tests on macOS

changelog_begin
changelog_end

* Make Oracle tests manual on macOS

* Update compatibility/sandbox-migration/util.bzl

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-23 21:51:38 +01:00
davidrichards-da
e33c8aa8a0
Replacing the Application Architecture Image (#13054)
* Replacing the Application Architecture Image

CHANGELOG_BEGIN
CHANGELOG_END

Replacing the Application Architecture Image for an updated version and making a few small changes in to the copy.

* Update docs/source/app-dev/app-arch.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Adding the path from the daml model to the DAR

Adding the missing path from the daml model to the DAR to the architecture image

* Update docs/source/app-dev/app-arch.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-23 19:48:31 +00:00
carrielaben-da
e4ba32dfe1
Releases and Versioning typo fix (#13058)
To address a typo in line 27

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
2022-02-23 14:12:32 -05:00
azure-pipelines[bot]
27b1703838
rotate release duty after 2022-02-23 (#13033)
@sofiafaro-da is taking care of testing today's release, so they get pushed back to the end of the line.

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

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-02-23 18:43:52 +01:00
Moritz Kiefer
4307614ddf
Drop auth0 support from create-daml-app (#13053)
I don’t own this, it’s broken and other people don’t want to fix it
for 2.0 so this PRs deletes it instead of shipping broken code.

fixes #13045

changelog_begin
changelog_end
2022-02-23 17:01:05 +00:00
davidrichards-da
0153a4084f
Removing the 'ledger topologies' page (#13025)
* Removing the 'ledger topologies' page

Removing the 'ledger topologies' page as much of the content is wrong and Canton's 'Architecture in depth' section goes into this in much more detail.  Also removing links to this page.

* Removing links to the removed page

Removing links to the removed topology page

* Removing another link to the page being removed

* Removing another link no longer needed

* Removing another link to the deleted file.

CHANGELOG_BEGIN
CHANGELOG_END

Removing another link

* Remove references to topologies

CHANGELOG_BEGIN
CHANGELOG_END

* Correcting a spelling mistake

Correcting a spelling mistake

* Updating Daml for VMware Blockchain

Updating Daml for VMware Blockchain

Co-authored-by: bame-da <bernhard.elsner@digitalasset.com>
2022-02-23 16:07:26 +00:00
nickchapman-da
b19567aa7a
Stack safe speedy compilation (#12925)
* Rework speedy compilation phase1 to be stack safe.

changelog_begin
changelog_end
2022-02-23 16:06:21 +00:00
pbatko-da
15b54a870e
[User management] Enable UM for sandbox-on-x and ledger-on-sql conformance tests (#13041)
The goal is to have a conformance test using Oracle and with UM enabled.

changelog_begin
changelog_end
2022-02-23 15:42:48 +01:00
tudor-da
2bfc08bb77
Refactorings (#12992)
* ReleasableResourceOwner and unit test
* Extract ledger end consumption out of LedgerEndPoller

changelog_begin
changelog_end
2022-02-23 15:01:34 +01:00
Simon Meier
7d0fadc3ca
user management: document limits (#13040)
* user management: document limits

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Pawel Batko <pawel.batko@digitalasset.com>
2022-02-23 14:55:05 +01:00
Moisés Ackerman
91ddbe9cf0
Include interface choices in 'damlc test' coverage stats (#13012)
changelog_begin
changelog_end
2022-02-23 13:44:36 +01:00
Bernhard Elsner
0b38882505
Update the component statuses page (#13021)
* Update the component statuses page

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/support/component-statuses.rst
2022-02-23 12:41:07 +00:00
Moritz Kiefer
99bd3d9095
Bump releases on main to 2.1.0 (#13035)
Our nightly snapshots pick up the top line here so cutting a release
to make sure that starting from tomorrow those will be labeled as
2.1.0. I won’t test this release so treat it the same as a nightly.

changelog_begin
changelog_end
2022-02-23 11:01:37 +00:00