Skip to content

feat: add config resolution for agent execution config - #642

Draft
JeffreyJPZ wants to merge 59 commits into
dapr:mainfrom
JeffreyJPZ:config-resolution-refactor
Draft

feat: add config resolution for agent execution config#642
JeffreyJPZ wants to merge 59 commits into
dapr:mainfrom
JeffreyJPZ:config-resolution-refactor

Conversation

@JeffreyJPZ

@JeffreyJPZ JeffreyJPZ commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

#590 naturally resulted in some refactoring/extra functionality related to agent config resolution that got mixed in with the health endpoints implementation. Since health endpoints is blocked for now I thought I'd open a separate PR for the other stuff.

  • Add instantiation/environment variable/state store config validation and resolution for AgentExecutionConfig (and AgentObservabilityConfig)
  • Move config resolution for AgentObservabilityConfig and AgentExecutionConfig out of AgentBase and DurableAgent into their respective classes
  • Fix bug where max_grpc_inbound_message_size_bytes accepts booleans
  • Create shared utilities for getting/coercing/validating/transforming/applying config values onto objects
  • Replace some magic numbers/strings with named constants/enums
  • Bump mypy to 3.11

Issue reference

Cherry picks some commits from #590

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Created/updated tests
  • Tested this change against all the quickstarts
  • Extended the documentation

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

TODO:

  • [x] Add unit tests for config helpers
  • [x] Add unit tests for agent execution config

JeffreyJPZ added 30 commits May 27, 2026 11:51
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 167a29f)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 5772f6a^..a2219d5)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit d5a26f8)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 267e26e^..5a75f7d)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 3d5fbd1)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 5a75f7d)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 40e247f)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 7b841e0)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 7fbe7f5)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
(cherry picked from commit 1bd3973)
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
…l choices

Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
@JeffreyJPZ
JeffreyJPZ marked this pull request as ready for review August 21, 2026 03:11
Copilot AI lite review requested due to automatic review settings August 21, 2026 03:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Comment on lines -883 to -884
def test_merge_none_values_dont_override(self, mock_llm):
"""Test that None values in override don't override base values."""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should be safe to remove since its covered by the config tests

Comment on lines -919 to -920
def test_merge_boolean_fields_correctly(self, mock_llm):
"""Test that boolean fields merge correctly with None handling."""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above

Comment on lines -955 to -956
def test_merge_empty_configs(self, mock_llm):
"""Test merging two empty configs."""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This becomes redundant with the refactor

@JeffreyJPZ
JeffreyJPZ marked this pull request as draft August 21, 2026 06:11
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
@JeffreyJPZ
JeffreyJPZ force-pushed the config-resolution-refactor branch from 67aea22 to 2fb344e Compare August 21, 2026 10:40
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
getter=lambda: getenv("DAPR_MAX_GRPC_INBOUND_MESSAGE_SIZE_BYTES"),
should_raise=False,
),
# TODO: support orchestration_mode from env

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ran into tons of issues trying to support orchestration_mode since None is a valid override, which conflicts with a lot of the existing behaviour. Putting this off for now since runtime config/hot-reloading doesn't support it (yet) which is probably the main benefit.

@JeffreyJPZ
JeffreyJPZ marked this pull request as ready for review August 21, 2026 18:40
@JeffreyJPZ
JeffreyJPZ marked this pull request as draft August 21, 2026 18:44
@JeffreyJPZ
JeffreyJPZ force-pushed the config-resolution-refactor branch from f960d85 to f9ae7f5 Compare August 21, 2026 20:34
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
@JeffreyJPZ
JeffreyJPZ force-pushed the config-resolution-refactor branch from f9ae7f5 to d69bf16 Compare August 21, 2026 21:15
Signed-off-by: Jeffrey Zhang <jeffreyjpizhang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants