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

Added Dapr Jobs .NET Quickstart #1131

Closed
wants to merge 10 commits into from

Conversation

WhitWaldo
Copy link
Contributor

Description

Do not merge yet:
README is incomplete until this bug can be resolved.

Issue reference

N/A - part of 1.15 endgame

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.

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.

Please see comments

jobs/csharp/sdk/jobs/EtlService/EtlService.csproj Outdated Show resolved Hide resolved
jobs/csharp/sdk/jobs/JobsApp/JobsApp.csproj Outdated Show resolved Hide resolved
throw new Exception("Unable to deserialize the payload from the scheduled job invocation");
}

await daprClient.InvokeMethodAsync(HttpMethod.Get, "etl-svc", $"/etl/{payload.TaskId}", cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think about using the "http proxy" approach to invoking the http call instead like we do in the basic service invoke quickstart? https://docs.dapr.io/getting-started/quickstarts/serviceinvocation-quickstart/

that shows you can keep using your favorite HTTP client and just pass a header, making dapr look a bit more familiar.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also can we sync to release-1.15 and try to get these C# checks to pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As this was the SDK quickstart, I opted to use the SDK-style service invocation instead of HttpClient as I figured that was better featured in the HTTP quickstart.

A sync to release-1.15 does not appear to be in the cards for me until all my PRs are closed. As best I can tell I'm going to have to delete my GitHub fork and re-create it to get it to sync anything but master (as it's the only branch I originally forked).

Choose a reason for hiding this comment

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

We are deprecating the InvokeMethodAsync calls fyi!

@WhitWaldo WhitWaldo marked this pull request as ready for review February 3, 2025 17:22
@WhitWaldo WhitWaldo requested review from a team as code owners February 3, 2025 17:22
@alicejgibbons
Copy link

@WhitWaldo Im going to propose we move this one to the dotnet samples repo as well to maintain consistency with the other Jobs samples! This is great but I think the sample needs to be consistent here.

@alicejgibbons alicejgibbons added the do-not-merge Do not merge the PR label Feb 3, 2025
@WhitWaldo
Copy link
Contributor Author

We can just close this then. The .NET repo already has an equivalent example, so no need to merge over a duplicate.

@WhitWaldo WhitWaldo closed this Feb 3, 2025
@WhitWaldo WhitWaldo deleted the jobs-dotnet branch February 4, 2025 17:11
@WhitWaldo WhitWaldo restored the jobs-dotnet branch February 4, 2025 17:12
@WhitWaldo WhitWaldo deleted the jobs-dotnet branch February 4, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Do not merge the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants