Adding rich backwards compatibility support to SDK#1816
Merged
Conversation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…apr.Common & registering with DI Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…ype injected into the constructor as part of build - changed DI so this isn't a separately registered type. Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…y named assembly Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…n tests Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
… in a central location Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…erator in Dapr.Common Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…timeCapabilities functionality Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…e per the reflection check Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…by the source generator Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…s runtimes Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…pubsub promotion in 1.17 Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1816 +/- ##
==========================================
- Coverage 65.30% 64.90% -0.41%
==========================================
Files 298 300 +2
Lines 8747 8832 +85
Branches 1023 1040 +17
==========================================
+ Hits 5712 5732 +20
- Misses 2780 2846 +66
+ Partials 255 254 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…uded + suppress warning about using the obsolete code Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
… and 10 over 8 Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
This was referenced Jun 11, 2026
This was referenced Jun 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The Dapr runtime commits to remaining backwards compatible on an N-2 release policy. In at least the last several releases, when the runtime has promoted an API from alpha to beta to stable, the .NET SDK has provided day-one support for the updated API signature. These changes were validated using integration tests run against the latest release candidates prior to launch and confirmed to work properly, but it wasn't until the release of 1.17 that we had the testing infrastructure in the SDK to validate against prior versions of the runtime.
As of a recent PR this release, I've updated the build infrastructure to automatically run all unit and integration tests against N-2 and N+1 RCs so I can confirm compliance with the stated SDK compatibility goals.
I confirmed with the runtime maintainers this week during our weekly sync about whether the Jobs stability promotion would be back-patched to the older runtime releases and learned it would not be, that it's the responsibility of the SDKs to engage correctly with any supported runtime versions.
Some of the other SDKs apparently handle this by first attempting the gRPC request against the stable endpoint and, if that fails, try it again against known older method name permutations until it works (or doesn't). I don't think this is ideal so after more consultation with @JoshVanL , I've gone down the gRPC reflection route. Upon connecting and attempting an affected SDK method, the SDK will (via code produced by a new source generator) inquire as to the methods available that fulfill the request and then automatically run through them from later generations to earlier (though if the runtime is responding with a stable generation, it shouldn't take more than the one attempt, unless there's a signature mismatch - and it looks for this in its evaluation).
This PR introduces a source generator not intended for direct use by the public that essentially automatically updates the SDK packages to include backwards compatibility versioning support against the runtime.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: