-
Notifications
You must be signed in to change notification settings - Fork 726
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
Update .net code tab on pubsub quickstart #3547
Conversation
in the dotnet section, the order-processor had `--app-port 7005` which was missing from the checkout, and it didn't work on my machine until I added `--app-port 7005` if you do not include the `--app-port 7005` on the checkout, you get this warning when doing the `dapr run`: `level=warning msg="App channel is not initialized. Did you configure an app-port?" app_id=checkout` Signed-off-by: Paul.42 <[email protected]>
strangely enough the ordering of parameters on the checkout command affect if the quickstart functions properly or not? Signed-off-by: Paul.42 <[email protected]>
@paulyuk please review |
@paul42 - Do you know how the |
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.
Please see comments
@@ -423,7 +423,7 @@ dotnet build | |||
Run the `checkout` publisher service alongside a Dapr sidecar. | |||
|
|||
```bash | |||
dapr run --app-id checkout --resources-path ../../../components -- dotnet run | |||
dapr run --app-id checkout --app-port 7006 --resources-path ../../../components -- dotnet run |
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 like the idea here, just two things:
- this change should be applied to the dapr run on
order-processor
- since that is the receiver of the POST/message. Is that what you meant to do? - we should use port 7006 and match the code exactly in the pub_sub quickstart
- if you set up Run/debug via launch.json please have that patch and name match the code. However in future my plan is to use dapr.yaml and
dapr run -f .
for all of this which will remove tedious steps and issues.
The source of truth is here. @msfussell and @hhunter-ms note the docs have drifted a bit from readmes and I suggest we coordinate an update.
https://github.com/dapr/quickstarts/tree/master/pub_sub/csharp/sdk
Correct the launch.json (debug launcher file for VSCode) did not from from the quickstart repo code. I'm guessing the user pressed F5/Run and followed the prompts to add the app and port. For launch.json to really work it needs to leverage the dapr.yaml file which is coming in this pr. I would love to consider a VS Code integration for quickstarts just we dont have that yet. @paul42 would you be ok sharing your entire launch.json? I'm curious what the final result looks like. If you could please clarify how you got one that would also help. |
hey @paulyuk sorry about my delayed response here (you all are very fast 😅 ) I apologize if I wrote my initial PR poorly, I did not add any launchSettings, I was speculating that the launchSettings in the order-processor folder was causing the issue. I'll run through the docs and PR, if the |
Stale PR, paging all reviewers |
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
updated .net code tab quickstart for pubsub - previously when running the quickstart as is, the 'checkout' will not properly send messages - I believe this is because in the
sdk\order-processor
folder there is a properties and launchSettings.json file with this entry:when I add
--app-port 7006
I am then able to see the entries show up on theorder-processor
tab. however, if I omit the--app-port
I get a warning on the checkout side:level=warning msg="App channel is not initialized. Did you configure an app-port?"
when I do put in matching app-port on checkout side, I get this message instead:
level=info msg="application discovered on port 7006"
I'm assuming that this is the correct way to operate and that I'm not accidentally wiring two services together, going against the usual dapr pattern?