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

start: work with console #14178

Merged
merged 2 commits into from Jun 16, 2022
Merged

Conversation

garyverhaegen-da
Copy link
Contributor

This fixes the bug reported by kctam on the forum: that

daml start

followed by

daml canton-console

doesn't work (because the console can't know which ports to connect to).

I'm very much not familiar at all with this area of the repo, so it's possible this is not the right approach to solving that at all. Please feel free to close and solve it in a better way if you know better.

CHANGELOG_BEGIN
- When using `daml start` (with no sandbox port configured in
  `daml.yaml`), the sandbox ports will no longer be random, and
  instead be the same ports as a plain `daml sandbox`.
CHANGELOG_END

This fixes the bug reported by `kctam` on [the forum]: that

[the forum]: https://discuss.daml.com/t/daml-start-then-using-daml-canton-console-to-access/4723

```
daml start
```

followed by

```
daml canton-console
```

doesn't work (because the console can't know which ports to connect to).

I'm very much not familiar at all with this area of the repo, so it's
possible this is not the right approach to solving that at all. Please
feel free to close and solve it in a better way if you know better.

CHANGELOG_BEGIN
- When using `daml start` (with no sandbox port configured in
  `daml.yaml`), the sandbox ports will no longer be random, and
  instead be the same ports as a plain `daml sandbox`.
CHANGELOG_END
@@ -69,9 +69,9 @@ getPortForSandbox defaultPortSpec portSpecM =
determineCantonOptions :: Maybe SandboxPortSpec -> SandboxCantonPortSpec -> FilePath -> IO CantonOptions
determineCantonOptions ledgerApiSpec SandboxCantonPortSpec{..} portFile = do
cantonLedgerApi <- getPortForSandbox (SpecifiedPort (SandboxPort 6865)) ledgerApiSpec
cantonAdminApi <- getPortForSandbox FreePort adminApiSpec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems sensible but I think it’s worth trying to dedup the default ports for daml start & daml sandbox between the two to avoid this getting out of sync in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a new commit. Is this what you had in mind?

Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thank you!

@garyverhaegen-da garyverhaegen-da enabled auto-merge (squash) June 16, 2022 08:00
@garyverhaegen-da garyverhaegen-da merged commit 3177786 into main Jun 16, 2022
@garyverhaegen-da garyverhaegen-da deleted the navigator-console-working-with-start branch June 16, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants