Repository navigation
[Backport release-1.19] fix(conf): read DAPR_* environment variables when a setting is used - #1326
Merged
Merged
Conversation
…1262) * fix(conf): read DAPR_* environment variables when a setting is used settings previously snapshotted the environment at import time, so variables set afterwards (python-dotenv, CLI arg parsing, frameworks that import dapr early) were silently ignored and the SDK dialed localhost. Resolve them on access instead; explicit assignments to settings still take precedence. Defaults that were bound at function definition (RetryPolicy, actor runtime/proxy/host timeouts) now resolve when called. Signed-off-by: Casper Nielsen <casper@diagrid.io> * fix(conf): address review feedback on lazy settings Name the setting in coercion errors, keep dir(settings) listing the settings, give the RetryPolicy default a readable repr, and cover the actor timeout defaults and edge cases in tests. Signed-off-by: Casper Nielsen <casper@diagrid.io> * fix(actor): keep explicit timeout=None as "no timeout" for actor clients Use a shared _FromSettings sentinel (now in dapr.conf) for the actor timeout defaults and RetryPolicy.max_attempts, so omitting the argument reads the setting at call time while an explicit None is still forwarded unchanged. Type the sentinel honestly instead of silencing mypy, document the defaults, restore hidden settings after each settings test, and cover register_actor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Casper Nielsen <casper@diagrid.io> * fix(actor): type explicit None timeouts and restore settings in tests Annotate the actor timeout parameters as Union[int, None, _FromSettings] so an explicit None ("no timeout") type-checks, and widen the actor clients' timeout to Optional[int] to match. Restore any assigned DAPR_HTTP_TIMEOUT_SECONDS (including None) after the register_actor tests, and document where RetryPolicy.max_attempts defaults from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Casper Nielsen <casper@diagrid.io> --------- Signed-off-by: Casper Nielsen <casper@diagrid.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 1ae907d) Signed-off-by: dapr-bot <dapr-bot@users.noreply.github.com>
dapr-bot
enabled auto-merge (squash)
October 21, 2026 09:42
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.19 #1326 +/- ##
===============================================
Coverage ? 86.87%
===============================================
Files ? 163
Lines ? 12994
Branches ? 0
===============================================
Hits ? 11288
Misses ? 1706
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nelson-parente
approved these changes
Oct 21, 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.
Backport 1ae907d from #1262.