Commit Graph

2591 Commits

Author SHA1 Message Date
Simon Meier
d522effecb
daml-on-x-server: document all participant state interfaces (#432)
* daml-on-x-server: document all participant state interfaces
2019-04-12 17:43:45 +02:00
moritzkiefer-da
118aa6de05
Check for VERSION and release-notes.rst in the same commit (#450) 2019-04-12 17:38:17 +02:00
Bolek@DigitalAsset
0eb3c53289
web-ide: clean up / refactor (#421)
* using typescript
* using npm scripts
* separated management route to another port
2019-04-12 15:01:55 +00:00
Gary Verhaegen
911b82c6df
release 0.12.2 (#445) 2019-04-12 15:56:43 +01:00
Gary Verhaegen
d80b660210
fix GitHub tag conflict on release (#451)
As multiple platforms will create different annotated tags (because an
annotated tag includes a tag time), they will conflict on trying to
push. Therefore, we go for a lightweight tag for now, as those are
simple pointers to a commit and git will recognize that they are the
same and there is no conflict.
2019-04-12 15:55:20 +01:00
Florian Klink
5f75e9d1a0 infra/vsts_agent_linux_startup.sh: warm up local caches, purge old agents (#438)
Warm up local caches by building dev-env and current daml master This is
allowed to fail, as we still want to have CI machines around, even when
their caches are only warmed up halfway.

Afterwards, we purge old agents that might still be around, that didn't
unregister themselves

This depends on #402 to be merged, as otherwise purge_old_agents.py
can't be found obviously.
2019-04-12 16:47:36 +02:00
moritzkiefer-da
f6c6dd6a9a
Accept multiple files in damlc test (#436)
* Accept multiple files in damlc test

Since damlc test also runs tests in transitive dependencies, this can
be significantly faster than running "damlc test" individually on
a set of files as you will end up recompiling and rerunning tests
multiple times if those files depend on each other.

For //docs:daml-ref-daml-test This is roughly a 10x improvement from
~70s to ~7s.
2019-04-12 16:21:34 +02:00
Gary Verhaegen
59f480d978 prepare release note for next release (#443) 2019-04-12 16:17:31 +02:00
moritzkiefer-da
45aa8b984b
Remove pandoc from dev-env (#441)
We used to use this for generating documentation but we no longer
do. Removing it should slim down dev-env and make GHC upgrades less painful.
2019-04-12 15:18:27 +02:00
moritzkiefer-da
77033a6a69 Refactor and speed up release script (#431)
This rewrites the release script to be a lot simpler and significantly
faster:

- The artifacts are now declared in a separate yaml file which should
  make it easier for people to modify and doesn’t clutter the actual
  code.
- There is only a constant number of calls to Bazel which speeds up
  the script quite a bit.

I verified that the release artifacts are the same that we got
before and I traced the calls to the jfrog binary in a fake release
and ignoring order they are identical.
2019-04-12 14:57:37 +02:00
Florian Klink
5f962ebf82 CI: Add script to purge old agents (#402)
This adds `ci/azure-cleanup`, containing a script that talks to azure pipelines, removing agents older than 25 hours in a specific pool.
Machines are meant to be killed after 24 hours anyway, make sure they're properly unregistered from Azure Pipelines, too.
By doing this, we don't need to unregister nodes manually on shutdown.

Idea is to execute this every time a new agent is provisioned, it has cloned the repo. We intend to clone the repo and pre-warm the caches there anyhow.

WIP until the repo fetching and cache pre-warming is present, too.

cc @zimbatm 

### Pull Request Checklist

- [x] Read and understand the [contribution guidelines](https://github.com/digital-asset/daml/blob/master/CONTRIBUTING.md)
- [x] Include appropriate tests
- [x] Set a descriptive title and thorough description
- [x] Add a reference to the [issue this PR will solve](https://github.com/digital-asset/daml/issues), if appropriate
- [x] Add a line to the [release notes](https://github.com/digital-asset/daml/blob/master/docs/source/support/release-notes.rst), if appropriate

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with `/AzurePipelines run` to
trigger the build.
2019-04-12 14:56:20 +02:00
Beth Aitman
b902239fa3
Remove ExcludeFromDamlTests (#437) 2019-04-12 14:44:17 +02:00
Gary Verhaegen
b37474b0e9
require manual publication of GitHub releases (#435)
Because automated testing is not yet part of our release pipeline, we
need to manually publish releases after manual testing.
2019-04-12 13:15:19 +01:00
Michał Majcherski
79bbf5c794
windows: working //:git-revision target (#434) 2019-04-12 13:25:31 +02:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00
Neil Mitchell
86b16997af
Clean up the guidelines for PR title/description (#427) 2019-04-12 11:33:11 +01:00
Gary Verhaegen
6110d4be3a
push releases to github (#413)
Azure Pipelines has direct integration with GitHub, so we're just using
that. Releases on GitHub have to target a tag, so we also need to push
the tag as an intermediate step; we also need to include the platform
name in the artifact to avoid overwriting from different builds.

The two "GitHub release" steps depend on two Azure variables that are
not defined in the pipeline script. This may look like it should not
work, but in fact it does, because these variables are set by the
release script.

In Azure Pipelines, any build step can set variables for the next build
steps by outputting specially-formatted text to stdout. This text will
not appear in the build output displayed by Azure Pipelines, e.g.:

```
echo '##vso[task.setvariable variable=sauce]tomatoes'
```

would define the Azure variable `sauce` to have the string `tomatoes` as
its value for the next build steps.

See [0] for details.

[0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-in-script
2019-04-12 11:30:13 +01:00
Gabor Aranyossy
3e154fd682
Sandbox Postgres support with passing api integration tests (#392)
* TransactionServiceIT passes

* fixup

* using record time taken from TimeProvider

* taming TransactionBackPressureIT to avoid overloading of submission service

* implement AutoClosable on all Ledger related components having stateful resources

* reenabling InMemory fixture

* disabling contract key integration test for SandboxSQL fixture

* removing TODO

* bumping up timeout on TransactionServiceIT due to slow Azure pipeline

* 1 minute timeout for SqlLedgerSpec

* making jdbcurl CLI argument hidden

* updating release notes
2019-04-12 12:25:48 +02:00
Fran
6984d9765d
Make daml-head work outside of devenv. (#428) 2019-04-12 12:03:05 +02:00
Fran
938bc4ae25
Rename sdk config file to sdk-config.yaml (#407)
* Rename sdk config file to sdk-config.yaml

* Use sed in head release.
2019-04-12 12:01:48 +02:00
Neil Mitchell
bfa019997a
Prototype to accelerate Windows development (#411)
* Initial rattle prototype

* Build the IDE core

* Ignore the Rattle directory

* Clean up the dependencies

* Require stack-1.10, since that does much better extra-dep caching

* Streamline the ghc-lib dependencies

* Compile more pieces

* Add a build.bat

* Make the Windows build use the correct stack.yaml to bootstrap

* Fix up enough to build on Windows

* Generate the dylib's on Mac

* Remove accidental -v

* Make the Haskell build driven by the Bazel metadata

* Get proto3-suite building

* Delete the unneeded haskell-dependencies

* Allow generating the proto files and compiling them

* Fix metadata to deal with """ syntax

* Fix metadata to deal with a list of globs

* More work in the direction of daml-ghc

* Use correct daml_lf proto version

* Tell GHC to use shared objects in TH

* Specify needed packages

* wip

* wip

* Switch to the fork of gRPC-haskell

* Build executables with rattle

* setup build.sbt in daml-lf

* Build binaries with rattle

* rattle-sbt, move scala build scripts out of daml-lf subdir, and into rattle subdir

* convert scala-build.sh into MainScala.hs

* Clean up rattle build

* Pre-merge clean up

* Switch to the newer version of ghc-lib-parser

* remove dev ls from MainScala.hs

* compile java generated from protos as separate projects

* Add copyright headers

* HLint fixes

* Uscrewup an HLint fix

* fix scala formatting of rattle/build.sbt
2019-04-12 10:45:11 +01:00
Michał Majcherski
5989549081
windows: fixed SHA256_TEXT daml-lf/interpreter test; less tools in dadew (#400) 2019-04-12 10:44:03 +02:00
Gerolf Seitz
bc5a543177
docs: Explain the dependencies for the output of the Java codegen. (#362) 2019-04-12 08:58:07 +02:00
Martin Huschenbett
9630d77ee7
Move tuple repacking in conversion to DAML-LF into separate function (#418)
* Move tuple repacking in conversion to DAML-LF into separate function

I need to use the same logic for implementing the `TextMap.toList` function.

* Improve naming and add documentation
2019-04-12 08:48:41 +02:00
Shayne Fletcher
5e1728976e
ghc-lib update : replace the mega tuple with a record (#417) 2019-04-11 19:47:05 -04:00
Martin Huschenbett
667a63a9b1
Add location information to DAML-LF produced by damlc (#390)
* Add location information to DAML-LF produced by damlc

This is required to get error locations in the scenario view. Rigth now,
the location information for `create`/`exercise` still points to the
template/choice. I'll fix that in a separate PR.

* Fix test expectations

* Fix more tests
2019-04-11 21:44:48 +02:00
moritzkiefer-da
14cb5be2d0
Make "damlc test" exit with non-zero exit code on failed scenarios (#394)
fixes #291
2019-04-11 20:44:49 +02:00
Nicolas Mattia
a059340cec
Set src_strip_prefix and expand deps in assistant (#408)
The `daml-assistant` BUILD file was missing an `src_strip_prefix` field
and abtracted away the dependency list for two of its targets. The
latter is not strictly needed and may lead to too many dependencies
being specified for the targets.
2019-04-11 18:16:26 +02:00
Jussi Mäki
b77cf2c56b
DamlOnX reference implementation (#348)
* Add participant-state and participant-state-index APIs and reference implementations

This adds the (still WIP) interfaces and the in-memory reference implementations
of participant-state and participant-state-index.

See issue #137.

* Pass ledgerId through to getLedgerEnd method

This is needed in the daml-on-x implementation of the
transaction service.

* Add api-server-damlonx and the reference server

This is the initial version of the ledger-api server built on top of
the participant state APIs.

While functionally complete (modulo test services), it has only yet
been tested with the semantic tester. The server and the participant
state APIs are still under active development.

See issue #137.

* Apply scalafmt and copyright headers to new damlonx code

* ledger/damlonx: Fix build errors after merge from master

* ledger/participant-state: separate out the reference impl

* ledger/participant-state-index: separate out reference impl

* ledger/damlonx: Refactoring

- Refactor participant-state into multiple modules
- Introduce structured offset and update id types (vector of ints)
- Properly parse ledger feature flags

* ledger: Disable failing semantic test. Decrease grouping duration.

* scalafmt, fix after merge

* Add missing copyright headers

* ledger/damlonx: Add Simon's comments

* ledger/damlonx: Remove UpdateId, use Offset in both state and state-index.

* ledger/damlonx: scalafmt

* damlonxserver: review participant-state interface

Includes adding issue links for postponed fixes.

* daml-on-x-server: review reference implementation

Fixme's added to https://github.com/digital-asset/daml/pull/348 and
extra issues creaed in https://github.com/digital-asset/daml/milestone/4

* ledger/damlonx: Use SimpleString

* ledgre/damlonx: Backtrack on SimpleString change

See issue #398

* daml-on-x-server: drop unused 'index.impl.reference.package.scala'

* daml-on-x-server: add note on potential transient contracts bug

* ledger/participant-state*: post-merge fixes
2019-04-11 18:05:08 +02:00
Neil Mitchell
a55c9cf7e5
Make records with less fields still abstract (#397) 2019-04-11 16:53:47 +01:00
Remy
14fdafede8
daml-lf fix Value spec (#401)
* daml-lf fix Value spec
2019-04-11 17:51:02 +02:00
Jussi Mäki
e73ad8b957
Add client_server_test bazel rule (#365)
* Add client_server_test bazel rule

This adds a generic mechanism for constructing a test that launches
a TCP server and runs a test-suite against it. The rule orchestrates
passing the port number from the server to the client via a temporary
file and takes care of killing the server when the client process exits.

Still to be done is figuring out a good way to pass additional arguments
to the server and client programs (where these arguments could be other
bazel rules).

* Add missing copyright headers

* Add support for arguments to client_server_test

Note that this does not support passing in labels (":my_data_file"),
nor does it support "$(location :my_data_file)" string macros.

* Add data attribute to client_server_test

* Add support for location expansion in client_server_test args

* client_server_test: Address code review

* client_server_test: Bump waiting for port file write to 5s
2019-04-11 17:31:54 +02:00
Jonas Chevalier
6f90fda6d1
infra: VSTS agent improvements (#369)
* infra: replace the debian image by ubuntu 16.04

be closer to what the azure vmImage is using

* infra: limit access to the PAT token
2019-04-11 17:11:14 +02:00
Fran
78d77d0a2e
Add a daml-sdk-head script. (#404) 2019-04-11 16:49:02 +02:00
Shayne Fletcher
a1221d66f4
update ghc-lib (windows fix) (#393)
Contains https://github.com/digital-asset/ghc-lib/pull/57
2019-04-11 09:34:46 -04:00
Nicolas Mattia
911de53a74
Drop DA src_strip_prefix (#389)
This prefix, used in da-hs-daml-cli, should not be needed. As it happens
I am surprised it doesn't break the build.
2019-04-11 14:46:10 +02:00
zimbatm
7c01a91a24 pull request template: add note on external contributions (#386) 2019-04-11 14:43:51 +02:00
Jussi Mäki
1f2246c822 Do not divulge contracts to observers in nonconsuming exercises (#325)
* Do not divulge contracts to observers in nonconsuming exercises

Disables support for non-default ledger feature flags, as they
are meaningless since ledger server logic does not respect the flags.
Instead of large refactoring to add support for the old flag settings,
it is best to disallow the deprecated flags, and later on phase out the
flags completely.

Re-enables test_divulgence_of_token in sandbox semantic tests.

Fixes #157.

* purge LedgerFlags entirely...

...since we only support one version of them anyway, and clearing them

* updated release notes
2019-04-11 14:41:35 +02:00
Nick Smith
03d3d909a0
Fix #152 java-codegen: Document parameterized types. (#290)
* Fix #152 java-codegen: Document parameterized types.

Explain the sources that the Java Code Generator creates for
parameterized DAML types including the implications for converting
between Java Bindings Value types and Java native types.
2019-04-11 14:36:14 +02:00
Michał Majcherski
08bd36a10c Windows CI (#364)
* ci: remove the old Jenkins files

* WORKSPACE: remove unuset this_breaks_windows

* ci: add Windows builds to Azure Pipeline
2019-04-11 14:26:55 +02:00
Fran
61d8459494
Simplify daml install & some refactoring. (#379)
* Get rid of channels.

* Refactor version code.

* Remove --initial flag.

* Update daml-assistant/daml-project-config/DAML/Project/Types.hs

Co-Authored-By: fmota-da <francisco.mota@digitalasset.com>
2019-04-11 13:58:49 +02:00
Martin Huschenbett
be7ce7174f
Turn off -Woverlowed-literals in damlc (#375)
* Turn off -Woverlowed-literals in damlc

This flag does not play well with location information obtained via `-ticky`.
Also, the error message you get from overflowed literals suggests to use
`-XNegativeLiterals`, which is a bad idea since it changes the meaning of
`(-1)` from `\x -> x - 1` to `negate 1`.

* Fix module name in test

Co-Authored-By: martin-drhu-da <31696042+martin-drhu-da@users.noreply.github.com>
2019-04-11 13:52:22 +02:00
Fran
0a906867ab
Use isWindows for runtime checks. (#381) 2019-04-11 13:13:45 +02:00
Jost Berthold
27e01d5148
HOTFIX damlc: make ghc-options public, refactor (#373)
* HOTFIX damlc: make ghc-options public, refactor

* refactor `--ghc-options` again to support repetition and space-separated options

With this change, it is possible to repeat `--ghc-option bla`, and also to space-separate
multiple ghc options in one instance, like `--ghc-options "--flag1 -flag2 argument"`
2019-04-11 20:58:55 +10:00
Shayne Fletcher
c2e4c5ebef
More contract key tests (#372)
* rename Register to ContractKeyTests and more tests

* switch to 'i' for signatory for clarity

* more experimental testing

* useless comment
2019-04-11 06:57:02 -04:00
Fran
69b5454b9d
Set script-mode to true in da-capsule script. (#378) 2019-04-11 12:55:02 +02:00
Fran
92cfc27f56
Avoid symbolic links altogether on windows. (#377)
* Only handle and test symbolic links on unix.

* Don't create a symbolic link on windows.
2019-04-11 12:09:34 +02:00
moritzkiefer-da
fa4067ad1b
Move POM file generation to Bazel rules (#374)
* Move POM file generation to Bazel rules
2019-04-11 11:24:52 +02:00
Fran
c6fc75d17b Switch to unix-compat for now. (#376) 2019-04-11 10:20:23 +01:00
Francesco Mazzoli
10fcab8040
move ContractTransactionChecks to ledger-api-integration-tests (#339) 2019-04-11 10:22:34 +02:00