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

[Bug] devcontainer usage #304

Open
bartclarkson opened this issue Sep 21, 2023 · 2 comments
Open

[Bug] devcontainer usage #304

bartclarkson opened this issue Sep 21, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@bartclarkson
Copy link

What are you really trying to do?

Goal: use the vscode devcontainer implementation with a minimum of configuration/overrides/additions.

Got things working as described below. Looking for guidance on these "fixes", and suspecting the documentation should be updated to be more clear on these points.

Describe the bug/repro/fixes

There seem to be two things required to get examples to run.

  1. The docker network ("temporal") is not configured for use as the DefaultHostPort by the Temporal Go SDK, which means the default 127.0.0.1:7233 produces failure until its correctly addressed. The following modification describes the change necessary to every c, err := client.Dial(client.Options{}) encountered in the examples.
	clientOptions := client.Options{
		HostPort: "temporal:7233",
	}
	c, err := client.Dial(clientOptions)

Is there a way to globally set the HostPort default to temporal:7233?

  1. To get the containers to all start, I added empty development_es.yaml at <repo>/.devcontainer/dynamicconfig/development_es.yaml.

Thank you for this repository.

Environment/Versions

OSX Monterey, Intel Chip

@bartclarkson bartclarkson added the bug Something isn't working label Sep 21, 2023
@cretz
Copy link
Member

cretz commented Sep 22, 2023

Is there a way to globally set the HostPort default to temporal:7233?

No. We intentionally do not share code across samples and it probably doesn't have much value to change every sample to use something like an environment variable. The samples are meant as code samples for you to alter as needed to fit your use case or target host (same for the myriad of other client connection options you may have to change).

To get the containers to all start, I added empty development_es.yaml

Hrmm, I wonder why this is needed. The docker compose should be enough. May have to investigate further to see why that is not the case.

@bartclarkson
Copy link
Author

Fair enough, @cretz, and thank you for the response.

I didn't really intend to monkey around with devcontainers in VSCode. The side quest proved entirely too interesting to resist, and has sparked some discussions on my end about the viability of embracing the practice. It did in this case present the uninitiated engineer with some off-topic docker stuff to figure out, but such is life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants