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

go-sdk workflow quickstart #973

Merged
merged 8 commits into from Feb 14, 2024
Merged

Conversation

mikeee
Copy link
Member

@mikeee mikeee commented Jan 31, 2024

Description

Adds a go workflow quickstart.

Tested locally, wip until the workflow PR (dapr/go-sdk#487) is merged and an RC is cut.

Issue reference

Will close #965

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • The quickstart code compiles correctly
  • You've tested new builds of the quickstart if you changed quickstart code
  • You've updated the quickstart's README if necessary
  • If you have changed the steps for a quickstart be sure that you have updated the automated validation accordingly. All of our quickstarts have annotations that allow them to be executed automatically as code. For more information see mechanical-markdown. For user guide with examples see Examples.

Signed-off-by: mikeee <hey@mike.ee>
Signed-off-by: mikeee <hey@mike.ee>
Signed-off-by: mikeee <hey@mike.ee>
Signed-off-by: mikeee <hey@mike.ee>
@paulyuk
Copy link
Contributor

paulyuk commented Feb 11, 2024

@mikeee looks great so far. Any chance you could set the target of this PR against the release-1.13 branch base instead of master?

@mikeee mikeee changed the base branch from master to release-1.13 February 11, 2024 22:17
@mikeee
Copy link
Member Author

mikeee commented Feb 11, 2024

@mikeee looks great so far. Any chance you could set the target of this PR against the release-1.13 branch base instead of master?

Done ✅

@paulyuk
Copy link
Contributor

paulyuk commented Feb 12, 2024

Hey @mikeee, it looks like the test/check for Go is failing on this new quickstart. It's pretty basic with a not found error:

	Actual stdout:
		ℹ️  Validating config and starting app "order-processor"
		ℹ️  Started Dapr with app id "order-processor". HTTP Port: 45753. gRPC Port: 33929
		ℹ️  Writing log files to directory : /home/runner/work/quickstarts/quickstarts/workflows/go/sdk/order-processor/.dapr/logs
		== APP - order-processor == go: cannot find main module, but found .git/config in /home/runner/work/quickstarts/quickstarts
		== APP - order-processor == 	to create a module there, run:
		== APP - order-processor == 	cd ../../../.. && go mod init
		The App process exited with error code: exit status 1
		
		ℹ️  Received signal to stop Dapr and app processes. Shutting down Dapr and app processes.

Could you please take a look?

One thing I usually do is run make validate in the same folder as the makefile on my local dev machine. you can catch errors well before the CI build.

Copy link
Contributor

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

No major blockers - just a couple suggestions.

workflows/go/sdk/order-processor/workflow.go Outdated Show resolved Hide resolved
workflows/go/sdk/order-processor/main.go Show resolved Hide resolved
@mikeee
Copy link
Member Author

mikeee commented Feb 12, 2024

Hey @mikeee, it looks like the test/check for Go is failing on this new quickstart. It's pretty basic with a not found error:

	Actual stdout:
		ℹ️  Validating config and starting app "order-processor"
		ℹ️  Started Dapr with app id "order-processor". HTTP Port: 45753. gRPC Port: 33929
		ℹ️  Writing log files to directory : /home/runner/work/quickstarts/quickstarts/workflows/go/sdk/order-processor/.dapr/logs
		== APP - order-processor == go: cannot find main module, but found .git/config in /home/runner/work/quickstarts/quickstarts
		== APP - order-processor == 	to create a module there, run:
		== APP - order-processor == 	cd ../../../.. && go mod init
		The App process exited with error code: exit status 1
		
		ℹ️  Received signal to stop Dapr and app processes. Shutting down Dapr and app processes.

Could you please take a look?

One thing I usually do is run make validate in the same folder as the makefile on my local dev machine. you can catch errors well before the CI build.

Yep, I'm aware of the error. The issue is that there is no release candidate cut for the go-sdk. I have a module replace pointed at the branch with workflows merged and this quickstart is passing. I could test against main, is this suitable for quickstarts?
Leaving this PR as draft until a consensus is reached.

workflows/go/sdk/order-processor/main.go Outdated Show resolved Hide resolved
workflows/go/sdk/order-processor/workflow.go Outdated Show resolved Hide resolved
workflows/go/sdk/order-processor/workflow.go Outdated Show resolved Hide resolved
workflows/go/sdk/order-processor/workflow.go Show resolved Hide resolved
workflows/go/sdk/order-processor/workflow.go Outdated Show resolved Hide resolved
@paulyuk
Copy link
Contributor

paulyuk commented Feb 13, 2024

Hey @mikeee, it looks like the test/check for Go is failing on this new quickstart. It's pretty basic with a not found error:

	Actual stdout:
		ℹ️  Validating config and starting app "order-processor"
		ℹ️  Started Dapr with app id "order-processor". HTTP Port: 45753. gRPC Port: 33929
		ℹ️  Writing log files to directory : /home/runner/work/quickstarts/quickstarts/workflows/go/sdk/order-processor/.dapr/logs
		== APP - order-processor == go: cannot find main module, but found .git/config in /home/runner/work/quickstarts/quickstarts
		== APP - order-processor == 	to create a module there, run:
		== APP - order-processor == 	cd ../../../.. && go mod init
		The App process exited with error code: exit status 1
		
		ℹ️  Received signal to stop Dapr and app processes. Shutting down Dapr and app processes.

Could you please take a look?
One thing I usually do is run make validate in the same folder as the makefile on my local dev machine. you can catch errors well before the CI build.

Yep, I'm aware of the error. The issue is that there is no release candidate cut for the go-sdk. I have a module replace pointed at the branch with workflows merged and this quickstart is passing. I could test against main, is this suitable for quickstarts? Leaving this PR as draft until a consensus is reached.

Yes, if you can reference a go module built from go-sdk main branch that is fine. My only requirement is the quickstart can clone/restore/run on my machine, and on the GH action machine without additional steps.

Signed-off-by: mikeee <hey@mike.ee>
Signed-off-by: mikeee <hey@mike.ee>
@mikeee mikeee marked this pull request as ready for review February 13, 2024 14:36
@paulyuk
Copy link
Contributor

paulyuk commented Feb 14, 2024

Hi @mikeee - let's figure out how to get that Validate Go check working. It's still complaining about go.mod.

Copy link
Contributor

@paulyuk paulyuk left a comment

Choose a reason for hiding this comment

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

need to get Go Validate check passing

bump go validation workflow to 1.21

(cherry picked from commit ec1e515)
Signed-off-by: mikeee <hey@mike.ee>
Copy link
Contributor

@paulyuk paulyuk left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulyuk paulyuk merged commit b6a3874 into dapr:release-1.13 Feb 14, 2024
7 checks passed
@mikeee mikeee deleted the mikeee-go-workflow branch February 15, 2024 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Workflow] Quickstart for Go SDK
4 participants