Commit Graph

572 Commits

Author SHA1 Message Date
Gary Verhaegen
961ca80b77
hunt down DAML (#13191)
Process:

- `git ls-files | xargs sed -i 's/DAML/Daml/g'`
- `git add -p`

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.

CHANGELOG_BEGIN
- Removed all traces of DAML. This may affect error messages and debug
  outputs.
CHANGELOG_END
2022-03-08 14:25:25 +01:00
Gary Verhaegen
54dc19deb8
add release instructions to release notification (#13160)
Because we can't expect people to magically know where to find them.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:33:15 +00:00
Gary Verhaegen
0002b7ebae
guard nightly (#13158)
In some cases we may end up with the tip of the main branch built as a
split release manually. When Azure then tries to run it, the release
fails (typically on the upload to NPM step).

Normally, Azure is set to run this only once per commit, but that only
applies when the run is successful. So if it breaks in a reproducible
way (e.g. because the version already exists on NPM), Azure will keep
trying every day.

This PR adds a simple guard that makes the nightly build _not_ a release
commit if the reelease already exists, which should short-circuit most
of the jobs in the build and finish successfully.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:16:01 +00:00
Victor Peter Rouven Müller
0dc167fa48
[JSON-API] Remove dependency on user provided tokens for the perf runner & refactor main (#13114)
* Don't error when user tokens are provided for the perf runner

changelog_begin
changelog_end

* Better token parsing error handling & extract user id to allocate the user if so

* make the code prettier

* Fix & simplify token parsing

* fix formatting of bazel file

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>

* correctly handle the response of createUser & don't throw if no LedgerId was found in the token

* Wrap exceptions in Futures

* Refactor Main.scala of the perf runner completely & remove dependency on user provided JWT's

* Minimize diff

* simplify code further

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

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

* Fix build

* Don't pass a jwt to the perf runner anymore everywhere it was used & fix ledger id to be right

* Minimize diff

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-03 16:12:40 +00:00
Moisés Ackerman
7ca26b01ce
make interface declaration where optional (#13129)
* Extend InterfaceSyntax test file with interfaces declared without 'where'

changelog_begin
changelog_end
2022-03-03 11:09:56 +00:00
Moisés Ackerman
2dbd91aab9
Interface methods can use plain function declaration syntax (#13102)
* Update 'implements' blocks to use new syntax

* Add InterfaceSyntax test case

* Add InterfaceMultipleMethodDeclsError test case

* Add InterfaceDifferentNumArgsError test case

changelog_begin
changelog_end
2022-03-02 15:59:01 +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
Moisés Ackerman
42462f4574
Notify Moisés on slack (#13026) 2022-02-22 17:07:50 +00:00
Moisés Ackerman
2532cf8991
Derive Eq for interfaces (#12988)
changelog_begin
changelog_end
2022-02-22 16:33:48 +01:00
Robert Autenrieth
18b681f521
DPP-745 Add Oracle data continuity tests (#12961)
* Add Oracle compatibility tests

changelog_begin
changelog_end

* Clean up

* Remove debug change

* Skip Oracle tests if there is nothing to do

* Add missing line warp

* Use ORACLE_PORT

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

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-02-16 23:37:50 +01:00
Moritz Kiefer
e40f62f88a
Revert "Switch to Bazel 5 (#12935)" (#12974)
This reverts commit 4c0118df4d.

This breaks passing -p to bazel test for Haskell tests, e.g.,

bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p
--test_arg InterfaceEq

which breaks with something horrifying like

moritz@adjunction ~/daml (main)> bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p --test_arg InterfaceEq
[dev-env] Building tools.bazel...
[dev-env] Built tools.bazel in /nix/store/m7gzlmr0pqjpl01ihgvazxgfs3sfwl61-bazel and linked to /home/moritz/daml/dev-env/var/gc-roots/bazel
[dev-env] Building tools.find...
[dev-env] Built tools.find in /nix/store/645v3545lcbx77wq7355rgdrgbhn5wx7-findutils-4.8.0 and linked to /home/moritz/daml/dev-env/var/gc-roots/find
INFO: Invocation ID: 034b3e45-851f-472e-ab71-b7f718829582
DEBUG: /home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/rules_haskell/haskell/private/versions.bzl:60:10: WARNING: bazel version is too recent. Supported versions range from 4.0.0 to 4.2.1, but found: 5.0.0- (@non-git)
/nix/store/dadkhf8vch2i2kvig962ilfr5j3chshr-go-1.17.6
/nix/store/pzh24n543i6jqa01hdmgqknlyf294bn1-bazel-nixpkgs-posix-toolchain
/nix/store/2hfwndk47wpvaib06qyhcdp83b423xvh-jq-1.6-bin
/nix/store/hjggs9s82qh7r5j8sgapn389hf24wdx8-bazel-nixpkgs-cc-toolchain
/nix/store/yxgg3bn4v288sc00kf09svrwz2r461c9-ghc-native-bignum-9.0.2
/nix/store/2hwx0jhcdsx3wfvmb50ih19jkh2ra4jh-glibc-locales-2.33-108
/nix/store/8wpmx049z8m0ffhy3jyi41qb6pbxwvy8-bazel-nixpkgs-java-runtime
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 3d79fe1470dcb842d5944c98dfe7a62715db6d86fdb12d3ff60af3bdf41b7996
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 9f46e824944add9e9951ef51ddb6cb4b744bc97f90b5749132179d1d1699dfa1
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o, previous action: action 'Compiling src/tools/launcher/dummy.cc', attempted action: action 'Compiling src/tools/launcher/dummy.cc'

changelog_begin
changelog_end
2022-02-16 18:24:00 +00:00
Moritz Kiefer
4c0118df4d
Switch to Bazel 5 (#12935)
* Switch to Bazel 5

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2022-02-16 10:47:05 +00:00
Moritz Kiefer
67f214b1d1
Fix daml script reference in copy-unix-release-artifacts (#12933)
I also changed CI config so we run this on every build but only upload
on releases. That should hopefully make sure we catch this immediately
next time. The script is fast enough that this shouldn’t slow this
down meaningfully.

changelog_begin
changelog_end
2022-02-15 09:53:15 +01:00
Moisés Ackerman
4848519fc6
Enable go-to-definition for interface methods and choices (#12903)
* Extend interface go to def test to cover methods and choices

changelog_begin
changelog_end
2022-02-15 08:30:30 +00:00
Gary Verhaegen
c04fa81d6a
ci: bump Windows workdirs (#12918)
Since #12645, we added a new pipeline, so we need to add a corresponding
entry.

As for #12645, the content of the files and the directory structure is
taken directly from a live CI node, as printed by the (now-named)
`workdirs` step.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-14 18:49:32 +00:00
Gary Verhaegen
c2a6397751
re-enabble patch-bazel-windows (#12905)
This reverts a small part of 9e1e42d27c
(#12901).

Microsoft seems to have given us our free parallel jobs back, so we can
run the patch_bazel job again.

Fixes #12900.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-14 11:23:48 +00:00
Moritz Kiefer
9e1e42d27c
Drop dependency on hosted nodes (#12901)
This should hopefully get CI working again.

There are two changes in here:

1. We can no longer change our patched Bazel. I didn’t switch away
   from the current patched version for now (we upload it to gcp bucket
   so it still works fine even if we cannot build it) but if we upgrade,
   we need to go to an unpatched version for now.
2. We need to get `az` from dev-env. I tested the self service compat
   job stuff and it works fine with this but there is a chance other
   parts don’t.

changelog_begin
changelog_end
2022-02-14 02:49:38 +01:00
Moisés Ackerman
a179f03197
Enable go-to-definition for interfaces (#12865)
* Add goto definition test cases for exceptions and interfaces

changelog_begin
changelog_end
2022-02-11 11:01:30 +00:00
Moritz Kiefer
6a91fdfe22
Fix version check in docs cron (#12882)
2 is not a valid version

changelog_begin
changelog_end
2022-02-10 20:25:04 +00:00
mziolekda
42ff83d456
Remove daml on sql artifacts and docs (#12870)
* stop publishing daml on sql aka Daml Driver for PotgreSQL

CHANGELOG_BEGIN
Stop publishing Daml Driver for PostgreSQL
CHANGELOG_END
2022-02-10 18:01:18 +00:00
Gary Verhaegen
356dd58cf0
split: tell slack (#12874)
Also, change timing of nightly snapshot to work better with Canton.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-10 15:33:34 +00:00
Moisés Ackerman
a59156084f
Generate Eq instances for interfaces (#12850)
changelog_begin
changelog_end
2022-02-10 15:13:20 +00:00
Sofia Faro
55cada7c47
Make interfaceTypeRep return a TemplateTypeRep (#12838)
* Make interfaceTypeRep return a TemplateTypeRep

Part of https://github.com/digital-asset/daml/issues/12788

* Update bazel-haskell-deps and code

changelog_begin
changelog_end

* Add missing import

* update ghc-lib sha

* update bazel-haskell-deps
2022-02-09 15:39:08 +00:00
Gary Verhaegen
3f2499dd41
stop creating snapshot PRs (#12819)
In the new process we'll rely on nightly split builds instead.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-08 18:57:23 +01:00
Gary Verhaegen
70c13f2d7e
split: add provenance info (#12760)
This is somewhat redundant with the version number for snapshots, but
will be useful for stable releases.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-04 14:44:16 +01:00
Gary Verhaegen
8423732bdd
daily snapshot: pick better time (#12757)
CI nodes are reset at 4, which means starting at 3 doesn't leave us with
enough time to complete.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-04 12:45:52 +00:00
Gary Verhaegen
8033b36509
fix daily yml (#12751)
I was a bit too enthusiastic and merged before running.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 20:37:11 +01:00
Gary Verhaegen
ca976fe3d7
nightly split releases (#12744)
Because there's no reason not to. The only obstacle to automating the
normal release process is that we need an explicit manual validation
step for our audit log when creating a release, but split-releases are
created in the Assemblty repo, so we can have the audit log over there.

The diff is going to be very messy because there's a lot of stuff moving
around. The only thing that is not just moving a job to a separate file
is the `ci/daily-snapshot.yml` file, which is 100% new and is meant as
a new Azure Pipelines entrypoint (which I will create after this gets
approved). I have made a reasonable effort to create individual commits
that simplify reviewing, but I expect it's still going to be kind of a
mess. I'm open to opening separate PRs to ~bump my stats~ move one job
at a time if that makes reviewing (and testing) easier.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 19:05:35 +00:00
Moisés Ackerman
3ce272b9f0
Replace experimental interface primitives with proper LF primitives (#12678)
* Add new primitives to proto spec

* implement E{Signatory,Observer}Interface in terms of EResolveVirtual{Signatory,Observer}

* define EToTypeRep primitive in terms of EToTypeRep Expr

* Remove experimental primitives TO_TYPE_REP and RESOLVE_VIRTUAL_{SIGNATORY,OBSERVER} 

changelog_begin
changelog_end
2022-02-03 13:36:45 +00:00
Stefano Baghino
437fca801a
Remind to start the Windows testing machine early (#12731)
changelog_begin
changelog_end
2022-02-03 10:42:09 +00:00
Moisés Ackerman
e4764cc426
Upgrade to GHC 9.0.2 (#12300)
changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-01 11:27:11 +01:00
Brian Healey
ef18bf4219
DEV all caps needed to exclude dev dependencies (#12679) 2022-01-31 16:39:51 +00:00
Moritz Kiefer
84cec38456
Upgrade ghc-lib (#12664)
* Upgrade ghc-lib

Bumping to include https://github.com/digital-asset/ghc/pull/96

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-31 13:29:34 +00:00
Moisés Ackerman
f1560ce646
Support implements qualified interfaces (#12644)
changelog_begin
changelog_end
2022-01-31 09:55:57 +01:00
Remy
35eae895e4
Compiler: expose LF builtin ExerciseByKey (#12615)
With this change, Daml exerciseByKey use the LF primitive
ExerciseByKey instead of the combinason of FetchByKey + Exercise.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-28 16:29:16 +01:00
Gary Verhaegen
98e68427cb
ci: pin Windows folders, step 1 (#12597)
The mapping from Azure job to local folder is managed by a handful of
JSON files under `$WORKDIR/SourceRootMapping`. Based on the sketchy
[documentation] that screams "don't mess with these definitely internal,
subject-to-change files", it seeems to me that our best bet for pinning
Windows work folders is to mess with these files. Specifically, take a
"version" of these files we like from a live CI machine and add those
specific files to the init script of our Windows nodes.

[documentation]: https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/jobdirectories.md

So the first step is to collect these files, which is what this PR aims
to accomplish.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 15:46:35 +01:00
Gary Verhaegen
42cf70b18e
ci: try to fix release process (#12600)
I'm not quite sure what's going wrong here, but this PR:

- Fixes a small bug in the process for determininng that we're _not_ in
  a split release, which worked because the boolean expression crashing
  is the same as the boolean expression returning false. But I'd still
  prefer if it returned false without crashing.
- Changes the condition for skipping the Windows installer so that in
  case of ternary+ logic we default to the harmless behaviour (including
  it).
- Makes a change that might have some impact maybe on the way Azure
  expands templates which may or may not result in the installer being
  excluded when it should be excluded. But this time if it doesn't work
  worst case we get an extra unused binary that uses some disk space,
  instead of crashing the release.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 13:57:39 +00:00
Moritz Kiefer
16a4f0626b
Avoid explicitly listing all Oracle tests in build.yml (#12594)
changelog_begin
changelog_end
2022-01-26 11:28:44 +00:00
Brian Healey
215a63d55c
correct deprecated options with newest synopsys-detect version (#12586)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 08:41:41 +01:00
Gary Verhaegen
ed33c0d5db
split: flat(ter) files in Artifactory (#12575)
The github/split-release split doesn't make sense at this level.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-25 16:41:55 +01:00
Gary Verhaegen
e355832bc1
split: do not push exe (#12574)
In the split release process, the executable installer has to be created
later in the pipeline, once we have the Canton parts available.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-25 16:29:57 +01:00
Brian Healey
73277f4210
Upgrade to oracle 19.14 image for ci (#12523)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-21 07:50:55 -05:00
Moritz Kiefer
d0813e61f1
Factor out version check in docs cron (#12459)
follow up to #12456

changelog_begin
changelog_end
2022-01-18 19:38:47 +00:00
Moritz Kiefer
01b0b76807
Support split releases in the docs cronjob (#12456)
Most of this is just documentation. The actual idea here is fairly
simple:

- The assembly repo pushes to S3 on each release (not yet implemented).
- The cronjob skips releases that are already there.
- Updating the top-level just piggybacks on what we already have.

changelog_begin
changelog_end
2022-01-18 16:05:31 +01:00
Moritz Kiefer
27bfd40365
Split Daml cron executable into separate modules (#12449)
This follows the approach we used for the BazelCache stuff and splits
the 3 different operations in 3 separate modules + one Github utility
module to make it a bit easier to follow.

This is pure reshuffling, no functional change.

changelog_begin
changelog_end
2022-01-18 09:46:29 +00:00
Gary Verhaegen
36a93ef0bf
try to fix paths in split-release (#12442)
See #12435.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-17 18:33:44 +01:00
Gary Verhaegen
502b21f830
split-release: publish temp files to artifactory (#12435)
See discussion on #12412 for details.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-17 15:40:20 +01:00
Moritz Kiefer
79428bb7b4
Add artifactory & SDK EE artifacts to split-release process (#12345)
Apologies for doing two things in one PR but they seemed somewhat
entangled.

For artifactory we follow the approach we use for Maven artifacts and
publish there directly.

For the SDK EE tarball, we just throw it in the split-release
directory and then the assembly repo can pick it up.

changelog_begin
changelog_end
2022-01-11 12:55:14 +01:00
nicu-da
ddf4f57b46
CI - Remove backwards compatible check for buf config. [KVL-1131] (#12301) 2022-01-07 02:00:02 -08:00
Moisés Ackerman
eff6df9e52
Fix {im,ex}plictly typoes (#12293)
changelog_begin
changelog_end
2022-01-06 19:15:01 +01:00