OrleansTestKit icon indicating copy to clipboard operation
OrleansTestKit copied to clipboard

Add method for adding PersistentState for grains using PersistentStateFacets

Open Romanx opened this issue 3 years ago • 5 comments

This is based on @enewnham's helper method in the linked issue. I've extended it to allow you to add multiple persistent states on the grain identified by StateName and StorageName.

I had to change StorageManager to allow multiple storages to be registered. I didn't change the existing interface and instead made them default the state name to Default.

closes #55

Romanx avatar Mar 11 '21 09:03 Romanx

Hi @Romanx ,

Are you planning to resolve the comments and finish the PR?

arnoldpistorius avatar Jul 14 '21 08:07 arnoldpistorius

Hey @arnoldpistorius,

I'm planning to but haven't found any time. If i'm lucky I should be able to today.

Romanx avatar Jul 14 '21 08:07 Romanx

Sorry for the delay in working on this. I've pushed changes and brought the original inline with main.

The major changes are now that Grain<TState> states are keyed in the same way that orleans does which is using the FullName of the grain type. This means that some changes had to be made to the interface when looking up the state information, you either have to provide a StateName or a Grain type.

I understand that this is a breaking change but it does make it more obvious what you're looking up and where.

Romanx avatar Jul 15 '21 10:07 Romanx

Hey, sorry for the long lack of movement on this PR. I brought this up to date with main and pulled in some changes from my local project that uses these extensions.

I got rid of more of the defaults and instead changed the interfaces to take the grain type so we can mimic orleans in the way the state is stored at a lower level.

There are more external facing changes than I wanted to make so this is probably a version bump in the library, not sure what the process is for your versioning, let me know if there are any other changes that you would want and I should have time to make them.

Romanx avatar May 12 '22 13:05 Romanx

@seniorquico Gentle nudge on a review for this if you've got time!

Romanx avatar Jun 06 '22 09:06 Romanx

@seniorquico +1 on the Gentle nudge

Romanx avatar Nov 25 '22 10:11 Romanx

@seniorquico and @Romanx what happened with the code? It seems to be removed / reverted when support for Orleans 7 has been added, is that correct?

michel-tr avatar Apr 07 '23 09:04 michel-tr

It does look like this ended up being removed when the the 7.0 branch was merged. I don't have time at the moment to re-apply the changes and submit a new PR so if you would like to @michel-codekapitein you're more than welcome.

I don't think the area changed much in Orleans 7 so you should be able to manually apply them quite quickly. If you do create a PR feel free to tag me and I'll take a look 👍

Romanx avatar Apr 11 '23 07:04 Romanx

I just looked at this with a mind to re-apply the PR but realized that it will be take me too long to get up to speed with the internals of testkit -- @Romanx -- any chance you have time now? :)

oising avatar Sep 05 '23 14:09 oising

I found a little time @oising so submitted a PR with the changes restored.

Romanx avatar Sep 06 '23 13:09 Romanx

@Romanx Thank you!

oising avatar Sep 06 '23 16:09 oising