Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a controller instance to state pool; remove prod cases of state.ForModel() #8043

Closed

Conversation

wallyworld
Copy link
Member

Description of change

This picks up on work Menno started to extract controller functionality from state. It's a work in progress.
StatePool gains a controller instance. All uses of state.ForModel() in non-test code is now gone.

Subsequent work will include:

  • Add a StatePool to Controller so that State creation always goes via the pool.
  • Move all MongoDB and Controller specific functionality onto Controller

QA steps

Run up a couple of controllers
Deploy apps and relate
Migrate model between controllers

@axw
Copy link
Contributor

axw commented Nov 9, 2017

Given the backwards relationships due to compromises made in this PR, I'm not sure this is a net win. Are we sure that a Controller should contain a StatePool? Can you describe your vision of how it should all hang together in the end?

Some of the ForModel calls can easily be changed to use a StatePool already. I'd prefer if we went through and changed those first, and then look at what's remaining. It might be that we can avoid some of these compromises in the first place.

@axw
Copy link
Contributor

axw commented Nov 9, 2017

Also, I have some simplifications in the pipeline which will mean fewer StatePools and States being maintained. This may make it easier to get to where we want to be.

@wallyworld
Copy link
Member Author

Reworking the approach to extract system state from state pool and remove the ability of controller to create a new state.

@wallyworld wallyworld closed this Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants