Skip to content

refactor: lifecycle dag#1571

Merged
free6om merged 108 commits intomainfrom
support/lifecycle-refactor
Mar 29, 2023
Merged

refactor: lifecycle dag#1571
free6om merged 108 commits intomainfrom
support/lifecycle-refactor

Conversation

@free6om
Copy link
Copy Markdown
Contributor

@free6om free6om commented Feb 22, 2023

refactor lifecycle in a more structured way

1. a DAG library
2. a two-stages reconciliation model build on the DAG library
3. refactor lifecycle by the new model

@free6om free6om added the area/cluster-controller Cluster controler label Feb 22, 2023
@free6om free6om added this to the Release 0.4.0 milestone Feb 22, 2023

package dag

type DAG struct {
Copy link
Copy Markdown
Contributor

@nashtsai nashtsai Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nashtsai
Copy link
Copy Markdown
Contributor

We don't need a DAG framework, I've introduced stateless for operator developers - https://pkg.go.dev/github.com/qmuntal/stateless#section-readme.

Use HSM for complex states handling, but for KubeBlocks Cluster operation controller-idioms's handler with both parallel and chain and chain with decision is sufficient enough.

@free6om free6om merged commit ea2177f into main Mar 29, 2023
@free6om free6om deleted the support/lifecycle-refactor branch March 29, 2023 06:52
@nashtsai nashtsai restored the support/lifecycle-refactor branch March 30, 2023 17:11
@nashtsai nashtsai deleted the support/lifecycle-refactor branch March 30, 2023 17:13
@nashtsai nashtsai restored the support/lifecycle-refactor branch March 30, 2023 17:13
free6om added a commit that referenced this pull request Apr 23, 2023
an enhancement to PR #1571 with following improvements:
1. add `AddTransformers`/`AddParallelTransformers` interface and move plan `Build` stage back to cluster controller
2. handle deletion first to support fast&force deletion
3. emit events after cluster status updated (in the `Execute` stage)
4. sample ut in `transformer_sts_horizontal_scaling_test.go` to show how to test a transformer without `envtest`
5. more docs and other minor improvements
free6om added a commit that referenced this pull request Apr 23, 2023
an enhancement to PR #1571 with following improvements:
1. add `AddTransformers`/`AddParallelTransformers` interface and move plan `Build` stage back to cluster controller
2. handle deletion first to support fast&force deletion
3. emit events after cluster status updated (in the `Execute` stage)
4. sample ut in `transformer_sts_horizontal_scaling_test.go` to show how to test a transformer without `envtest`
5. more docs and other minor improvements

(cherry picked from commit 70828b6)
nashtsai pushed a commit that referenced this pull request Apr 23, 2023
an enhancement to PR #1571 with following improvements:
1. add `AddTransformers`/`AddParallelTransformers` interface and move plan `Build` stage back to cluster controller
2. handle deletion first to support fast&force deletion
3. emit events after cluster status updated (in the `Execute` stage)
4. sample ut in `transformer_sts_horizontal_scaling_test.go` to show how to test a transformer without `envtest`
5. more docs and other minor improvements

(cherry picked from commit 70828b6)
nashtsai pushed a commit that referenced this pull request Apr 23, 2023
an enhancement to PR #1571 with following improvements:
1. add `AddTransformers`/`AddParallelTransformers` interface and move plan `Build` stage back to cluster controller
2. handle deletion first to support fast&force deletion
3. emit events after cluster status updated (in the `Execute` stage)
4. sample ut in `transformer_sts_horizontal_scaling_test.go` to show how to test a transformer without `envtest`
5. more docs and other minor improvements

(cherry picked from commit 70828b6)
@free6om free6om deleted the support/lifecycle-refactor branch June 5, 2023 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants