-
Notifications
You must be signed in to change notification settings - Fork 503
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
refactor: remove state policy #18260
Open
SimonRichardson
wants to merge
3
commits into
juju:main
Choose a base branch
from
SimonRichardson:remove-state-policy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+132
−428
Conversation
This file contains 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
Tested this out with #18206 More issues of state code depending on domain 😃😃 @SimonRichardson @manadart
|
The state policy is now gone. We don't need this in the future, it was a bad design and overly complex. Policy is a terrible word here. Anyway, this is gone.
SimonRichardson
force-pushed
the
remove-state-policy
branch
from
October 17, 2024 09:14
38bd837
to
52de196
Compare
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.
Removes the state policy package altogether. It's gone!
We need to be more aggressive with our cuts. We have an issue where state code depends on domain services, and for model migration, domain services depend on state code. We're essentially stuck, so we need to solve this impasse. The solution provided here is just to remove the domain services from the state. The domain services shouldn't have been added to state, but it did allow us to keep moving at the time.
It should be "policy" not to inject services into the state package, as we end up locking up at some point. Instead, we should either implement sane dependencies and fix them when implementing the epic, or lift the dependency out of state and push it down as an argument to method on state.
For policy, I've used the former and in doing so, I've ripped out all the policy.
QA steps
We need to bootstrap and test on both machine and containers. Then we need to be able to migrate from 3.6 to main.
Use this branch
Repeat this process for microk8s.