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 .NET client for new Dapr Jobs API support #1320

Closed
wants to merge 65 commits into from

Commits on Jul 6, 2024

  1. Added .NET client for new Dapr Jobs API support

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    3301b03 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Removed explicit .NET 7 targeting

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    5732ca5 View commit details
    Browse the repository at this point in the history
  2. Using AddDaprJobsClient for consistency with other SDKs

    Signed-off-by: Whit Waldo <whitwaldo@innovian.net>
    WhitWaldo committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    debf7ad View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Refactored the DaprClientBuilder out to a common project. Updated dep…

    …endencies in both Dapr.Client and Dapr.AspNetCore
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    c3b2a8c View commit details
    Browse the repository at this point in the history
  2. Renamed to reflect that it's a Dapr exception

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    12fb796 View commit details
    Browse the repository at this point in the history
  3. Updated solution to propertly find Dapr.Common in /src directory

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    cfd74f7 View commit details
    Browse the repository at this point in the history
  4. Added scheduler.proto and updated project file to autogenerate approp…

    …riate gRPC types + client
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    24ae98c View commit details
    Browse the repository at this point in the history
  5. Removed unused type

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    4e5d856 View commit details
    Browse the repository at this point in the history
  6. Fixed an XML comment that didn't make sense

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    d0e577b View commit details
    Browse the repository at this point in the history
  7. Implemented service-specific equivalent of DaprClientBuilder for Dapr…

    … Jobs
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    5faa914 View commit details
    Browse the repository at this point in the history
  8. Updated to support DaprJobClientOptions which specify the App ID and …

    …namespace the job is being requested by
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    4ca40eb View commit details
    Browse the repository at this point in the history
  9. Added DI registration extensions that support options

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    b0291bf View commit details
    Browse the repository at this point in the history
  10. Refactored out DaprException to common project - retained same namesp…

    …ace so nothing is changed in Dapr.Client
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    797be63 View commit details
    Browse the repository at this point in the history
  11. Fixed method not returning properly

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    c4b028b View commit details
    Browse the repository at this point in the history
  12. Added extension method for parsing a TimeSpan from a Golang interval

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    c15e090 View commit details
    Browse the repository at this point in the history
  13. Implemented all but the Watch method on the client

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    f3a7c41 View commit details
    Browse the repository at this point in the history
  14. Added missing copyright headers

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    6157cd0 View commit details
    Browse the repository at this point in the history
  15. Finished out most of the WatchJobs method.

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    0f0954d View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. Adding attribute to mark endpoints for Job trigger invocations

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    2cdd554 View commit details
    Browse the repository at this point in the history
  2. Partially through bidirectional watcher implementation, but stopping …

    …at this point pending further discussion as to intended goals around how this is intended to be utilized (e.g. as opposed to strictly using an HTTP callback)
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    e713661 View commit details
    Browse the repository at this point in the history
  3. Updates to use the correct protos (dapr runtime, not the scheduler se…

    …rvice)
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    49c78eb View commit details
    Browse the repository at this point in the history
  4. Added default null values

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    e76b323 View commit details
    Browse the repository at this point in the history
  5. Added schedule job overloads for when the developer doesn't want to s…

    …ubmit job data
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    79e56d6 View commit details
    Browse the repository at this point in the history
  6. Rather than 6 overloads of the same method, changed the names of each…

    … pair to match their purpose
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    9723ff5 View commit details
    Browse the repository at this point in the history
  7. Solution update

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    6bd99c5 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Removed serialization from SDK - swapping to only accepting and retur…

    …ning a byte[] as the job payload and trying it out for size
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    63df29d View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2024

  1. Update to use ReadOnlyMemory<byte> instead of byte[]

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    d6cbf51 View commit details
    Browse the repository at this point in the history
  2. Refactored the generic client builder so that less identical code nee…

    …ds to be included in each of the override package-specific client builders
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    bcdf08b View commit details
    Browse the repository at this point in the history
  3. Updating constructor to use protected instead of public

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    597ac0d View commit details
    Browse the repository at this point in the history
  4. Neglected to update DaprJobsGrpcClient to reflect signature changes. …

    …Opted for implementation that eliminates one allocation (using .Span on ReadOnlyMemory<>)
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    c08376a View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Removed DaprJobClientOptions as no longer needed since we're using th…

    …e appropriate gRPC API now
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ff3cf9c View commit details
    Browse the repository at this point in the history
  2. Consolidated all the extensions

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    3e1b0f3 View commit details
    Browse the repository at this point in the history
  3. Renamed to ScheduledJobAttribute to match the API name

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    e44dca0 View commit details
    Browse the repository at this point in the history
  4. Adding ASP.NET Core to package to add route builder extension support

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    5b7600d View commit details
    Browse the repository at this point in the history
  5. Added another registration overload so the developer isn't forced to …

    …specify either of the action methods just to discard them.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    c15fa66 View commit details
    Browse the repository at this point in the history
  6. Shifted schedule deserialization into the JobDetails record itself an…

    …d out of the grpc client.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    a29a4dd View commit details
    Browse the repository at this point in the history
  7. Adding JobsSample project to prove out API

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    1252ef6 View commit details
    Browse the repository at this point in the history
  8. Removed tentatively unnecessary attribute since we're relying on ASP.…

    …NET Core source generation instead of a custom one
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4057ca5 View commit details
    Browse the repository at this point in the history
  9. Simplified example

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    449609e View commit details
    Browse the repository at this point in the history
  10. Fixing unit tests - resolving errors due to lack of InternalsVisibleT…

    …o attributes following Dapr.Common refactoring.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    0101327 View commit details
    Browse the repository at this point in the history
  11. Fixed last locally-broken test client due to lack of InternalsVisible…

    …To attribute on Dapr.Common
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    c860260 View commit details
    Browse the repository at this point in the history
  12. Updated name of invocation endpoint registration method to include "D…

    …apr"
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    fb983a9 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Building out unit tests

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    b3db843 View commit details
    Browse the repository at this point in the history
  2. Removed unused using

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    f6333e9 View commit details
    Browse the repository at this point in the history
  3. Added some null validation

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    2bf4cfd View commit details
    Browse the repository at this point in the history
  4. Refactored to use the same naming convention as the other types in th…

    …e project
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    e5d5646 View commit details
    Browse the repository at this point in the history
  5. Building on last commit, updated extension names

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    61b1978 View commit details
    Browse the repository at this point in the history
  6. Adding more unit tests

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    90a5fe1 View commit details
    Browse the repository at this point in the history
  7. Removed unused type

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    e674fa8 View commit details
    Browse the repository at this point in the history
  8. Updated to use int? instead of uint? for repeats parameter. Added che…

    …ck in GRPC client implementation to check for negative values.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4215d87 View commit details
    Browse the repository at this point in the history
  9. Added support for IDisposable

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8e72f5a View commit details
    Browse the repository at this point in the history
  10. Updated to support provisioning an HttpClient from IHttpClientFactory…

    … instead of creating a new instance from the DaprClientGenericBuilder.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    20be1d5 View commit details
    Browse the repository at this point in the history
  11. Fixed an issue with the API token not being properly passed into clie…

    …nt - caught while augmenting unit tests
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    1780337 View commit details
    Browse the repository at this point in the history
  12. Another tweak to finalize fix for Dapr API token - updated tests as well

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    22d3a17 View commit details
    Browse the repository at this point in the history
  13. Adding helper deserialization extension methods + tests

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    60b1c88 View commit details
    Browse the repository at this point in the history
  14. Added more helper extension methods for serializing strings and JSON-…

    …compatible objects.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    db4f93f View commit details
    Browse the repository at this point in the history
  15. Naming correction to ensure parameter names are similar from one sche…

    …dule method to the next
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    62052e6 View commit details
    Browse the repository at this point in the history
  16. Removed JsonSerializerOptions support from DaprJobsClient as it's not…

    … used anywhere. Rather, previous commits provided helper extensions that will allow configurable serialization, but the methods exposed on the DaprJobsClient assume the developer will bring their own serialization approach to bear.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    9fef177 View commit details
    Browse the repository at this point in the history
  17. First pass at updating documentation

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    39dbcf8 View commit details
    Browse the repository at this point in the history
  18. Updated packages to fix build errors because of everything's dependen…

    …cy on Dapr.Client.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8d59928 View commit details
    Browse the repository at this point in the history
  19. Forced to update these packages to 8.0.0 because of other transitive …

    …references through project references. This is unfortunate because it requires some updates for nullability changes which was hopefully out of scope for this initative.
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4a101a6 View commit details
    Browse the repository at this point in the history
  20. Fixed build errors introduced by the transient reference to Microsoft…

    ….Extensions.Http 8.0.0 by rolling that version back to 3.1.32 (updated Dapr.Extensions.Configuration to the latest minor release of 3.1.32 from 3.1.2 in the process).
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    ffdb47b View commit details
    Browse the repository at this point in the history
  21. Fixed issues in the unit tests caused by over-eager fix on the Dapr A…

    …PI token
    
    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8eb57f5 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Configuration menu
    Copy the full SHA
    81f9ef5 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Fixed incorrect unit test

    Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
    WhitWaldo committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    2e26e13 View commit details
    Browse the repository at this point in the history