-
Notifications
You must be signed in to change notification settings - Fork 226
Include Expected Outputs to Hello World Sample #439
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,67 @@ | ||
| ### Steps to run this sample: | ||
| 1) Run a [Temporal service](https://github.com/temporalio/samples-go/tree/main/#how-to-use). | ||
| 2) Run the following command to start the worker | ||
| ### Steps to run this sample (with expected output): | ||
| 1) Run a [Temporal server](https://github.com/temporalio/samples-go/tree/main/#how-to-use). (If you are going to run locally, you will want to start it in another terminal; this command is blocking and runs until it receives a SIGINT (Ctrl + C) command.) | ||
|
|
||
|
|
||
| If you used the above instructions to start the server, you should see a line about the CLI, Server and UI versions, and one line each for the Server URL, UI URL and Metrics endpoint. It should look something like this: | ||
|
|
||
| ```bash | ||
| > temporal server start-dev | ||
| CLI 1.5.1 (Server 1.29.1, UI 2.42.1) | ||
|
|
||
| Server: localhost:7233 | ||
| UI: http://localhost:8233 | ||
| Metrics: http://localhost:57058/metrics | ||
| ``` | ||
|
|
||
| 2) Open a second terminal, and run the following command to start the worker. The worker is a blocking process that runs until it receives a SIGINT (Ctrl + C) command. | ||
| ```bash | ||
| go run helloworld/worker/main.go | ||
| ``` | ||
| 3) Run the following command to start the example | ||
|
|
||
| You should see two console log lines: | ||
| 1. Creating the logger | ||
| 2. Starting the Worker with Namespace `default`, and TaskQueue `hello-world` and it will list the WorkerID for the created worker. | ||
|
|
||
| For example: | ||
| ```bash | ||
| 2025/12/22 15:00:15 INFO No logger configured for temporal client. Created default one. | ||
|
|
||
| 2025/12/22 15:00:16 INFO Started Worker Namespace default TaskQueue hello-world WorkerID 82087 | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > Timestamps and IDs will differ on your machine. | ||
|
|
||
| 3) In a third terminal, run the following command to start the example | ||
| ```bash | ||
| go run helloworld/starter/main.go | ||
| ``` | ||
|
|
||
| You should see three console log lines: 1) Creating the logger, 2) Starting the workflow, and 3) The workflow result. | ||
|
|
||
| For example: | ||
| ```bash | ||
| 2025/12/22 15:07:24 INFO No logger configured for temporal client. Created default one. | ||
|
|
||
| 2025/12/22 15:07:25 Started workflow WorkflowID hello_world_workflowID RunID 019b47ac-7c4d-701f-9d35-3acfe171723e | ||
|
|
||
| 2025/12/22 15:07:25 Workflow result: Hello Temporal! | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| > [!NOTE] | ||
| > This sample relies on the existence of the `default` namespace. If you are a Temporal contributor and built the server locally using [these instructions](https://github.com/temporalio/temporal/blob/main/CONTRIBUTING.md) instead of the dev server in step 1, the `default` namespace is not created automatically. You will need to create it using the instructions below or you will get an error message when starting the worker: `Unable to start worker Namespace default is not found.` | ||
| > | ||
| >Confirm that the `default` namespace exists using this command: | ||
| > | ||
| >```bash | ||
| >temporal operator namespace list | ||
| >``` | ||
| >You should see a line with `NamespaceInfo.Name` set to `default`. | ||
| > | ||
| >If you do not find a namespace named `default`, you can create it here using this command: | ||
| > | ||
| >```bash | ||
| >temporal operator namespace create -n default | ||
| >``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure having this all in a
NOTEblock is necessary, it's already in its ownTroubleshootingblock.But great detail to add! TBH I wasn't aware of this fact until now haha