Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Canton Sandbox in the SDK #11831

Closed
cocreature opened this issue Nov 23, 2021 · 1 comment
Closed

Include Canton Sandbox in the SDK #11831

cocreature opened this issue Nov 23, 2021 · 1 comment
Assignees
Labels
language Language team work SDK 2.0

Comments

@cocreature
Copy link
Contributor

cocreature commented Nov 23, 2021

Concretely I’d propose the following steps:

  1. First update Canton to the latest release (built using the split release process) and switch to the --auto-connect-local flag and drop the bootstrap ammonite script.
  2. Then get the Canton Sandbox in a state where we can run daml start using it.
  3. Figure out the UX for configuring the Canton Sandbox. This can probably be driven by switching over tests but a few points we need to have answers for: static time, grpc max inbound message size, ports. We are generally moving towards config files over CLI flags so maybe just exposing the canton config files works nicely.

In terms of the UX, we don’t need to be fully backwards compatible. E.g., not supporting DARs on the CLI is fine. We won’t have implicit party allocation. But we also shouldn’t break stuff for the sake of it and we should have an answer for regular development workflows.

@cocreature cocreature self-assigned this Nov 23, 2021
cocreature added a commit that referenced this issue Nov 25, 2021
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Nov 25, 2021
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Nov 25, 2021
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Nov 26, 2021
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
@sofiafaro-da sofiafaro-da self-assigned this Dec 15, 2021
sofiafaro-da added a commit that referenced this issue Dec 21, 2021
Part of #11831

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Dec 21, 2021
Part of #11831

changelog_begin
changelog_end
@cocreature cocreature added the language Language team work label Jan 5, 2022
sofiafaro-da added a commit that referenced this issue Jan 13, 2022
Also drop the default sandbox on `daml start`

Part of #11831

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 13, 2022
Also drop the default sandbox on `daml start`

Part of #11831

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 17, 2022
Also drop the default sandbox on `daml start`

Part of #11831

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 17, 2022
* Rename daml sandbox to daml sandbox-kv

Also drop the default sandbox on `daml start`

Part of #11831

changelog_begin
changelog_end

* update release test instructions

* try to fix a couple compat tests

* dont need special 0.0.0 logic

* buildifier-fixx
sofiafaro-da added a commit that referenced this issue Jan 17, 2022
Some progress on #11831

* made `daml start` use canton sandbox by default
  * changed the non-ledger api ports to use free ports by default
    (still haven't tried using port 0 instead of `getFreePort`).
* renamed `daml sandbox-canton` to `daml sandbox`
* implement a `--static-time` option for `daml sandbox` that sets the
  canton clock type parameter to `sim-clock`
* moved the quickstart-java integration test to use the new sandbox
  * the test uses `--static-time`, but doesn't really depend on it

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 18, 2022
* Change default sandbox to canton.

Some progress on #11831

* made `daml start` use canton sandbox by default
  * changed the non-ledger api ports to use free ports by default
    (still haven't tried using port 0 instead of `getFreePort`).
* renamed `daml sandbox-canton` to `daml sandbox`
* implement a `--static-time` option for `daml sandbox` that sets the
  canton clock type parameter to `sim-clock`
* moved the quickstart-java integration test to use the new sandbox
  * the test uses `--static-time`, but doesn't really depend on it

changelog_begin
changelog_end

* fix parens

* fix hot reload test

* reinstant --sandbox-kv in create-daml-app test for now

* fix damlStart test
sofiafaro-da added a commit that referenced this issue Jan 20, 2022
Part of #11831

This PR is just to make it easier to migrate to the new sandbox.
I changed the behavior of --port-file to output a simple port (the
old behavior can be obtained with --canton-port-file instead, which
outputs all the port files of each participant), and I added a --dar
option to upload a dar after setting up the sandbox.

In addition, I made the `daml sandbox` command output something on
startup & success. The previous version was completely silent, so
you couldn't tell just from running it whether it was succesful.

However, I did discover that `--static-time` was accidentally
a no-op. Upon enabling it, I find that sim-clock doesn't work,
it causes canton to hang. This seems like a canton issue, but
needs further investigation.

For testing, I'm using --port-file and --dar in the quickstart
integration test, and --canton-port-file in the other canton
sandbox test.

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 20, 2022
* Add some compatibility flags in daml sandbox

Part of #11831

This PR is just to make it easier to migrate to the new sandbox.
I changed the behavior of --port-file to output a simple port (the
old behavior can be obtained with --canton-port-file instead, which
outputs all the port files of each participant), and I added a --dar
option to upload a dar after setting up the sandbox.

In addition, I made the `daml sandbox` command output something on
startup & success. The previous version was completely silent, so
you couldn't tell just from running it whether it was succesful.

However, I did discover that `--static-time` was accidentally
a no-op. Upon enabling it, I find that sim-clock doesn't work,
it causes canton to hang. This seems like a canton issue, but
needs further investigation.

For testing, I'm using --port-file and --dar in the quickstart
integration test, and --canton-port-file in the other canton
sandbox test.

changelog_begin
changelog_end

* redundant message

* Allow multiple --dar arguments
sofiafaro-da added a commit that referenced this issue Jan 20, 2022
Part of #11831. This kills another two uses of sandbox-kv.

Also fixes a daml-helper issue where we weren't passing "localhost" to the
ledger flags, so it was complaining about starting outside of a project.

changelog_begin
changelog_end
sofiafaro-da added a commit that referenced this issue Jan 20, 2022
Part of #11831. This kills another two uses of sandbox-kv.

Also fixes a daml-helper issue where we weren't passing "localhost" to the
ledger flags, so it was complaining about starting outside of a project.

changelog_begin
changelog_end
@cocreature
Copy link
Contributor Author

@sofiafaro-da I think we can close this. Please reopen if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Language team work SDK 2.0
Projects
None yet
Development

No branches or pull requests

2 participants