Skip to content

.NET: Re-enable the "retrieve object" check in StateManager - #1881

Merged
Jacob Alber (lokitoth) merged 2 commits into
mainfrom
dev/dotnet_workflow/state_manager_object_check
Mar 25, 2026
Merged

.NET: Re-enable the "retrieve object" check in StateManager#1881
Jacob Alber (lokitoth) merged 2 commits into
mainfrom
dev/dotnet_workflow/state_manager_object_check

Conversation

@lokitoth

Copy link
Copy Markdown
Contributor

Motivation and Context

As we implemented more of Checkpointing and proper support for polymorphic values behind PortableValue, there was a brief period where the Declarative layer needed to gradually switch from the old way of using the APIs to PortableValue. To make this integration easier, we temporarily disabled the check that users are not trying to read object from the state store.

Description

This change restores the check.

Closes #1369

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 3, 2025 21:35
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Nov 3, 2025

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.

Pull Request Overview

This PR re-enables a previously disabled validation check that prevents reading state as object type. The check was previously commented out pending upstream updates, but is now being enforced.

Key Changes:

  • Uncommented the NotSupportedException that was disabled in StateManager.cs

@lokitoth
Jacob Alber (lokitoth) added this pull request to the merge queue Dec 16, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 16, 2025
@lokitoth
Jacob Alber (lokitoth) added this pull request to the merge queue Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

.NET: Re-Enable failure for StateManager.ReadStateAsync<T>() when T is object

4 participants