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: filter events to reconcile by CRD API version #8521

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

leon-inf
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines. label Nov 25, 2024
@leon-inf leon-inf added this to the Release 1.0.0 milestone Nov 25, 2024
@leon-inf leon-inf force-pushed the support/v1-api-version-filter branch from cd9c5a2 to 1392463 Compare November 29, 2024 02:14
@leon-inf leon-inf marked this pull request as ready for review November 29, 2024 02:17
add("", name)
} else {
add(annotations[constant.CRDAPIVersionAnnotationKey], name)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For a map type, if you only get an object, GoLang will return a zero value of the corresponding value type even if the map is nil.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

reflect.TypeOf(&appsv1.ComponentDefinition{}),
reflect.TypeOf(&appsv1.ComponentVersion{}),
reflect.TypeOf(&appsv1.Component{}),
reflect.TypeOf(&workloadsv1.InstanceSet{}):
Copy link
Contributor

Choose a reason for hiding this comment

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

how to reconcile the cd/cmpd, seems constant.CRDAPIVersionAnnotationKey not patched on these objects

Copy link
Contributor Author

@leon-inf leon-inf Nov 29, 2024

Choose a reason for hiding this comment

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

Annotations will be added to cd/cmpd/cmpv within the Addon.

Copy link
Contributor

@wangyelei wangyelei Nov 29, 2024

Choose a reason for hiding this comment

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

somewhat invasive for addon and is only needed when coexisting with version 0.9

@apecloud-bot apecloud-bot added the approved PR Approved Test label Nov 29, 2024
@wangyelei wangyelei self-requested a review November 29, 2024 04:05
@leon-inf leon-inf force-pushed the support/v1-api-version-filter branch from 1a85942 to 8e78693 Compare November 29, 2024 05:17
@apecloud-bot apecloud-bot removed the approved PR Approved Test label Nov 29, 2024
@leon-inf leon-inf force-pushed the support/v1-api-version-filter branch from 8e78693 to 956b766 Compare November 29, 2024 06:25
@leon-inf leon-inf force-pushed the support/v1-api-version-filter branch from 956b766 to c88da1b Compare November 29, 2024 06:27
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 62.76596% with 35 lines in your changes missing coverage. Please review.

Project coverage is 60.86%. Comparing base (61eb47e) to head (c88da1b).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controllerutil/predicate.go 0.00% 24 Missing ⚠️
...trollers/apps/transformer_cluster_normalization.go 77.41% 5 Missing and 2 partials ⚠️
controllers/apps/component_controller.go 50.00% 1 Missing ⚠️
...llers/dataprotection/storageprovider_controller.go 0.00% 1 Missing ⚠️
...rollers/experimental/nodecountscaler_controller.go 0.00% 1 Missing ⚠️
controllers/workloads/instanceset_controller.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8521      +/-   ##
==========================================
+ Coverage   60.75%   60.86%   +0.10%     
==========================================
  Files         376      376              
  Lines       45506    46262     +756     
==========================================
+ Hits        27648    28158     +510     
- Misses      15291    15501     +210     
- Partials     2567     2603      +36     
Flag Coverage Δ
unittests 60.86% <62.76%> (+0.10%) ⬆️

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.

@apecloud-bot apecloud-bot added the approved PR Approved Test label Nov 29, 2024
@leon-inf leon-inf merged commit 808f253 into main Dec 2, 2024
35 checks passed
@leon-inf leon-inf deleted the support/v1-api-version-filter branch December 2, 2024 07:27
@leon-inf
Copy link
Contributor Author

leon-inf commented Dec 2, 2024

/cherry-pick release-1.0-beta

Copy link

github-actions bot commented Dec 2, 2024

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks/actions/runs/12114610184

github-actions bot pushed a commit that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants