* rewrite trigger docs to follow gsg
Per #10419 point 4, I've rewritten the Triggers section to build upon
the Getting Started Guide instead of inventing its own example.
Compared to #10395, this has a lot more explanations as this page must
now serve the dual purpose of being a possible "next step" from the GSG
and being the main reference page for triggers. It's also lost the "next
steps" section, which I think is a bit of a shame, but it doesn't really
make sense here.
There's also no easy way for people not interested in the GSG to follow
along; should we expose the "completed GSG" as a tempate?
CHANGELOG_BEGIN
CHANGELOG_END
* keep copy-trigger as a template
* fix copy-trigger project name
* make up gsg-trigger template
* remove awkward sentence, fix existing typo
* update code to use when{,Some}
* add to
* swap emitCommands and getCommandsInFlight
* typo
* insist on state-correction perspective
* fix copy-trigger tests
* add back copy-trigger to whitelist
* add gsg-trigger to whitelist
changelog_begin
changelog_end
- DAML -> daml
- Assistant -> assistant
The capitalization of the latter fixed one occurrence of a capitalized 'A'
which was inconsistent with the vast majority of uncapitalized 'a's.
* Support fetching SDK EE tarball in the assistant
This PR adds an `artifactory-api-key` field to `daml-config.yaml`. If
this is set, we will download the SDK EE tarball if it exists, falling
back to GH releases on 404s (for old releases).
changelog_begin
- [Daml Assistant] The assistant now supports an `artifactory-api-key`
field in `daml-config.yaml`. If you have a license for Daml Connect
EE you can specify this and the assistant will automatically fetch
the EE edition which provides additional functionality.
changelog_end
* Hardcode first EE snapshot
changelog_begin
changelog_end
* add livez endpoint to auth middleware
* Add OAuth 2.0 middleware to Daml SDK
* unhide trigger service auth flags
changelog_begin
- [Triggers] The trigger service now supports authorization through an
auth middleware. The feature is enabled using the `--auth` and
`--auth-callback` command-line flags. Please refer to the
Authorization chapter of the trigger service documentation for further
instructions.
- [OAuth 2.0 middleware] Daml Connect now includes an implementation of
the auth middleware API that supports OAuth 2.0 Authorization Code
Grant. Please refer to the Auth Middleware and OAuth 2.0 Auth
Middleware chapters of the documentation.
changelog_end
* drop early access flag on triggers
Daml triggers, the trigger service, and the auth middleware are no
longer marked as early access features.
changelog_begin
- [Triggers] Daml Triggers and the Trigger Service are no longer in
early access status.
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
We use the new cache folder specified with `DAML_CACHE` defaulting to
`.cache/daml` as a new cache folder for the assistant to store available
versions etc.
This does not migrate an existing cache folder and just starts a new
one.
CHANGELOG_BEGIN
CHANGELOG_END
* telemetry: use an extra cache directory for telemetry
If the sdk's `.daml` directory is not writable, telemetry fails and
kills the IDE. We add a new assistant environment variable "DAML_CACHE".
If set, this directory is used for telemetry cache data.
Fixes#8396.
CHANGELOG_BEGIN
CHANGELOG_END
* try creating directory
* check for already existing machine id file
* set DAML_CACHE to read-only in assistant integration tests
* Dont look for daml.yaml in SDK install.
Unless you're running "daml install project".
Fixes#5720
changelog_begin
changelog_end
* use pattern synonym for raw install target
* assistant: prompt users to automatically update PATH
We ask the Max/Linux users on installation if we should update their
PATH environment variable to point to the assistant binary and
automatically do so when the answer is affirmative.
CHANGELOG_BEGIN
CHANGELOG_END
* set .profile insetad .bashrc
* add a case for sh
* fix tests
CHANGELOG_BEGIN
CHANGELOG_END
* use imports only on nix systems
* update windows updatePath function for YesNoAuto flag.
CHANGELOG_BEGIN
CHANGELOG_END
In preparation for the renaming, we are stripping the DAML prefix. It
is still called SDK and the sdk-version variable keeps existing.
changelog_begin
changelog_end
Fixes#7381.
```
$ alias daml=~/.daml/sdk/0.0.0/daml/daml
$ daml version
DAML SDK versions:
0.0.0
1.4.0
1.5.0-snapshot.20200811.4959.0.bbc2fe56
1.5.0-snapshot.20200818.5027.0.1b33d374
1.5.0-snapshot.20200902.5118.0.2b3cf1b3 (default SDK version for new projects)
$ DAML_SDK_VERSION=invalid daml version
daml: Invalid value for environment variable DAML_SDK_VERSION.
context: Determining SDK version and path.
details: Invalid SDK version "invalid": Failed reading: takeWhile1
$ DAML_SDK_VERSION=1.4.4 daml version
DAML SDK versions:
0.0.0
1.4.0
1.4.4 (selected by env var DAML_SDK_VERSION, not installed)
1.5.0-snapshot.20200811.4959.0.bbc2fe56
1.5.0-snapshot.20200818.5027.0.1b33d374
1.5.0-snapshot.20200902.5118.0.2b3cf1b3 (default SDK version for new projects)
$ DAML_SDK_VERSION=1.4.0 daml version
DAML SDK versions:
0.0.0
1.4.0 (selected by env var DAML_SDK_VERSION)
1.5.0-snapshot.20200811.4959.0.bbc2fe56
1.5.0-snapshot.20200818.5027.0.1b33d374
1.5.0-snapshot.20200902.5118.0.2b3cf1b3 (default SDK version for new projects)
$ DAML_SDK_VERSION=1.5.0-snapshot.20200902.5118.0.2b3cf1b3 daml version
DAML SDK versions:
0.0.0
1.4.0
1.5.0-snapshot.20200811.4959.0.bbc2fe56
1.5.0-snapshot.20200818.5027.0.1b33d374
1.5.0-snapshot.20200902.5118.0.2b3cf1b3 (selected by env var DAML_SDK_VERSION, default SDK version for new projects)
$
```
CHANGELOG_BEGIN
CHANGELOG_END
This adds an empty template for the daml assistant. This is very helpful
for writing katacoda's, because otherwise you have to delete contained
source files in the `skeleton` project everytime as a first step. The
README in the `daml` directory is mainly there to get the daml directory
in the template.
CHANGELOG_BEGIN
CHANGELOG_END
I've completely removed the possibility to call `daml codegen ts`. I'm
happy to add in back in a followup PR once I've seen that all our tests
pass without it existing.
CHANGELOG_BEGIN
CHANGELOG_END
* Add snapshot version support in daml-assistant.
changelog_begin
- [DAML SDK] ``daml version`` can now list the available snapshot
versions by passing the flag ``--snapshots=yes``.
- [DAML SDK] ``daml install latest`` can now include the latest snapshot version by passing the flag ``--snapshots=yes``.
changelog_end
* Keep backward-compatible --all behavior
* Fix comment
* Delete spurious punctuation
Previously we emitted 3 lines starting with a capslock `WARNING` which
seems to scare some people. Now we emit two lines without the
`WARNING` and point to the release notes since that seems better than
explaining to users how they upgrade without telling them what
changed.
It’s still two lines, I couldn’t come up with anything shorter that
seems reasonable. We might want to reduce the frequency at which this
is displayed as well but for now this should do.
changelog_begin
changelog_end
* Report assistant commands and errors via a logger.
CHANGELOG_BEGIN
CHANGELOG_END
* Hook up daml-assistant to a GCP logger.
* fix test case
* fix more tests
* Check opted in status in assistant.
* Anonimize args that have unexpected characters.
* More agressive anonimization
* add missing containers dependency
* Enhanced completions for the assistant
changelog_begin
- [DAML Assistant] The assistant can now do completions for SDK
commands, e.g., ``daml ledger upl<TAB>`` will complete to ``daml
ledger upload-dar``.
changelog_end
* Apply suggestions from code review
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
* Shut down when stdin is closed.
changelog_begin
- [DAML Assistant] The DAML assistant will now shut down long-running
processes like sandbox when stdin is
closed. This is mainly useful on Windows, where process APIs often
kill the process in a way that does not allow it to do any cleanup, in
particular, we cannot stop child processes.
changelog_end
For now, the logic for this is only in daml-helper which is the only
thing starting long-running processes (in particular sandbox). There
is a long inline-comment explaining why this is not on the assistant
itself.
fixes#4168
* Add Zsh completions for the assistant
This is slightly more annoying for users since at least on Linux there
doesn’t seem to be a user-writable directory that is in `$fpath` by
default. I think on Zsh we could probably write them to
/usr/local/share/zsh/site-functions but I’d rather avoid platform
specific logic here. I would expect that Zsh users are usually
somewhat comfortable with modifying the config and this also matches
other installation instructions, e.g.,
https://github.com/zsh-users/zsh-completions#manual-installation.
On the plus side, the completions look significantly nicer in Zsh
since they include the description of commands.
CHANGELOG_BEGIN
- [DAML Assistant] Zsh completions for the DAML Assistant are now
installed as part of ``daml install``. To activate them you need to
add ``~/.daml/zsh`` to your ``$fpath``, e.g., by adding
``fpath=(~/.daml/zsh $fpath)`` to the beginning of your ``~/.zshrc``
before you call ``compinit``.
CHANGELOG_END
* Fix tests
* Update daml-assistant/src/DA/Daml/Assistant/Install/Completion.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
* Improve bash completions for daml-assistant.
* Install bash completion script automatically
* Better default logic for bash completions
* specifically -> explicitly
* Copyright headers
* Better hook logic and refactoring
* Handle non-standard installations more robustly.
* Handle CI env & add changelog note.
CHANGELOG_BEGIN
- [DAML Assistant] Bash completions for the DAML assistant are now
available via ``daml install``. These will be installed automatically
on Linux and Mac. If you use bash and have bash completions installed,
these bash completions let you use the tab key to autocomplete
many DAML Assistant commands, such as ``daml install`` and
``daml version``.
CHANGELOG_END
* Mention bash completion in assistant docs
* Remove promises