Add integration tests for control plane logic
### Tasks
- [ ] Checking that `Chain` with first segment is created at startup
- [ ] Checking that new chain segment is added once previous segment is selead
- [ ] Checking that segment is sealed if there is risk to lose write/f-majority
I've shared a super sketchy draft PR here that shows some my current thinking: https://github.com/restatedev/restate/pull/2045/files
It doesn't build and isn't integrated into the existing cluster scheduler; rather it takes a slightly different and more functional approach to deciding the next state + required effects if any.
@pcholakov has this been covered with the NodeSetSelector PR?
@tillrohrmann somewhat; there is coverage for all the mentioned scenarios but it only exercises the cluster controller, not integrated. I'd like to keep this issue open for now please - I was going to tackle it properly once we settle on how to configure replicated loglet bootstrap (mainly, how to supply the initial replication factor).
@pcholakov what's the status of this issue? Shall we mark it as done for the scope of the preview version?
@tillrohrmann we definitely do not have these, not what I think of as integration tests; we have very good unit test coverage of these paths and indirect integrated test coverage via other tests. I'd still like to get to this some day but I think it might be okay to drop it from the scope of the next release? Happy to prioritize this higher in the next few days if you think it's important though.
I will remove it from the preview umbrella issue then.
Tx!