Quality focused updates#3
Merged
Merged
Conversation
jsedlak
commented
Mar 3, 2026
Owner
- Updates Durable to 10.x lib
- Fixes in how outbox processing happens
- Adds optional cleanup method for recipients
- Internal unit testing fixes
There was a problem hiding this comment.
Pull request overview
This PR upgrades Strata and its test suite to Orleans/Durable 10.x and adjusts grain lifecycle/outbox behavior, along with test-host configuration updates to support the new persistence approach.
Changes:
- Bumps Strata package/library version to 1.1.0 and updates Orleans journaling dependency to 10.x.
- Refactors
JournaledGrainlifecycle wiring and adds optional recipient cleanup hook. - Updates journaling tests to use default in-memory grain storage and adjusts grains/state usage accordingly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Strata/Strata.csproj | Version bump to 1.1.0 and Orleans.Journaling upgrade to 10.x |
| src/Strata/JournaledGrain.cs | Lifecycle/outbox processing changes + recipient cleanup hook |
| src/Strata/CHANGELOG.md | Adds 1.1.0 release notes |
| CHANGELOG.md | Adds 1.1.0 release notes (root) |
| .changes/.version | Bumps tracked version to 1.1.0 |
| src/Strata.Journaling.Tests/Strata.Journaling.Tests.csproj | Adds memory persistence package dependency |
| src/Strata.Journaling.Tests/JournalingTests/JournalingTestFixture.cs | Configures default memory grain storage for tests |
| src/Strata.Journaling.Tests/JournalingTests/Grains/DelayedAccountGrain.cs | Updates usings for Orleans 10.x changes |
| src/Strata.Journaling.Tests/JournalingTests/Grains/AccountViewModelGrain.cs | Switches to [PersistentState] and modifies activation behavior |
| src/Strata.Journaling.Tests/JournalingTests/Grains/AccountGrain.cs | Updates usings, comments out lifecycle overrides, and updates view-model on balance changes |
Comments suppressed due to low confidence (1)
src/Strata.Journaling.Tests/JournalingTests/Grains/AccountViewModelGrain.cs:40
- The state initialization on activation has been commented out, but both
GetBalance()andUpdateBalance()dereference_state.State. If no record exists,_state.Statecan benull(sinceAccountViewModelis a class), causing aNullReferenceException. Restore proper initialization (e.g., set_state.State = new AccountViewModel()and write it when!_state.RecordExists) and remove the commented-out code block.
// public override async Task OnActivateAsync(CancellationToken cancellationToken)
// {
// await base.OnActivateAsync(cancellationToken);
//
// if(!_state.RecordExists)
// {
// _state.State = new();
// //await _state.WriteStateAsync();
// }
//
// }
public Task<double> GetBalance() => Task.FromResult(_state.State.Balance);
public async Task UpdateBalance(double newBalance)
{
_logger.LogInformation("Receiving balance update for account {0} to {1}", this.GetPrimaryKeyString(), newBalance);
_state.State.Balance = newBalance;
await _state.WriteStateAsync();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.