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

chore: add sharding controller #8197

Closed
wants to merge 26 commits into from

Conversation

Y-Rookie
Copy link
Collaborator

No description provided.

@Y-Rookie Y-Rookie requested review from leon-inf and a team as code owners September 24, 2024 10:13
@Y-Rookie Y-Rookie marked this pull request as draft September 24, 2024 10:13
@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines. label Sep 24, 2024
@Y-Rookie Y-Rookie marked this pull request as ready for review September 26, 2024 09:48
Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 63.78378% with 335 lines in your changes missing coverage. Please review.

Project coverage is 60.99%. Comparing base (00ad81b) to head (a6d6f2a).
Report is 144 commits behind head on main.

Files with missing lines Patch % Lines
controllers/apps/transformer_sharding_restore.go 13.58% 70 Missing ⚠️
controllers/apps/transformer_sharding_service.go 57.94% 37 Missing and 8 partials ⚠️
controllers/apps/transformer_sharding_component.go 60.18% 29 Missing and 14 partials ⚠️
controllers/apps/sharding_plan_builder.go 73.75% 30 Missing and 7 partials ⚠️
...ers/apps/transformer_sharding_api_normalization.go 69.00% 20 Missing and 11 partials ⚠️
...trollers/apps/transformer_cluster_backup_policy.go 76.25% 11 Missing and 8 partials ⚠️
pkg/controller/component/component.go 13.33% 13 Missing ⚠️
controllers/apps/transformer_cluster_service.go 65.71% 8 Missing and 4 partials ⚠️
controllers/apps/transformer_cluster_status.go 72.09% 8 Missing and 4 partials ⚠️
pkg/controllerutil/sharding_utils.go 0.00% 10 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8197      +/-   ##
==========================================
- Coverage   61.32%   60.99%   -0.34%     
==========================================
  Files         348      356       +8     
  Lines       40357    40905     +548     
==========================================
+ Hits        24749    24950     +201     
- Misses      13371    13674     +303     
- Partials     2237     2281      +44     
Flag Coverage Δ
unittests 60.99% <63.78%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

}
return nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

exist many duplicated codes with componentPlanBuilder Is it possible to add a base_plan_builder that override specific logic through overloading?

compSpec *appsv1.ClusterComponentSpec) (*appsv1.ComponentDefinition, string, error) {
comp := &appsv1.Component{}
err := cli.Get(ctx, types.NamespacedName{Namespace: cluster.Namespace, Name: component.FullName(cluster.Name, compSpec.Name)}, comp)
if err != nil && !apierrors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

client.IgnoreNotFound(err) != nil

@Y-Rookie Y-Rookie closed this Dec 18, 2024
@github-actions github-actions bot added this to the Release 0.9.2 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants