You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "wangao1236 (via GitHub)" <gi...@apache.org> on 2023/02/02 08:21:09 UTC

[GitHub] [incubator-uniffle] wangao1236 opened a new pull request, #540: [operator] fix error kind of ownerreference

wangao1236 opened a new pull request, #540:
URL: https://github.com/apache/incubator-uniffle/pull/540

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://github.com/apache/incubator-uniffle/blob/master/CONTRIBUTING.md
     2. Ensure you have added or run the appropriate tests for your PR
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]XXXX Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
   -->
   
   ### What changes were proposed in this pull request?
   Fix #529 
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] wangao1236 commented on pull request #540: [operator] fix error kind of ownerreference

Posted by "wangao1236 (via GitHub)" <gi...@apache.org>.
wangao1236 commented on PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#issuecomment-1413384599

   > Hi @wangao1236 ao, could you help also edit the PR summary here to fill the contents:?
   > 
   > ```
   > Why are the changes needed?
   > Does this PR introduce any user-facing change?
   > How was this patch tested?
   > ```
   
   Ok, I'll do it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] codecov-commenter commented on pull request #540: [operator] fix error kind of ownerreference

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#issuecomment-1413350122

   # [Codecov](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#540](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0f5db17) into [master](https://codecov.io/gh/apache/incubator-uniffle/commit/0d24c26196b6726d4729adfd537511f6b43f7e4f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d24c26) will **increase** coverage by `0.72%`.
   > The diff coverage is `87.50%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #540      +/-   ##
   ============================================
   + Coverage     59.20%   59.93%   +0.72%     
   + Complexity     1786     1653     -133     
   ============================================
     Files           213      200      -13     
     Lines         12358    11081    -1277     
     Branches       1042      920     -122     
   ============================================
   - Hits           7317     6641     -676     
   + Misses         4635     4063     -572     
   + Partials        406      377      -29     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...bernetes/operator/pkg/controller/controller/rss.go](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGVwbG95L2t1YmVybmV0ZXMvb3BlcmF0b3IvcGtnL2NvbnRyb2xsZXIvY29udHJvbGxlci9yc3MuZ28=) | `33.22% <0.00%> (ø)` | |
   | [...oy/kubernetes/operator/pkg/controller/util/util.go](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGVwbG95L2t1YmVybmV0ZXMvb3BlcmF0b3IvcGtnL2NvbnRyb2xsZXIvdXRpbC91dGlsLmdv) | `40.49% <100.00%> (+7.77%)` | :arrow_up: |
   | [...y/kubernetes/operator/pkg/webhook/inspector/rss.go](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGVwbG95L2t1YmVybmV0ZXMvb3BlcmF0b3IvcGtnL3dlYmhvb2svaW5zcGVjdG9yL3Jzcy5nbw==) | `47.70% <100.00%> (ø)` | |
   | [...he/uniffle/server/storage/LocalStorageManager.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9zdG9yYWdlL0xvY2FsU3RvcmFnZU1hbmFnZXIuamF2YQ==) | `85.87% <0.00%> (-1.13%)` | :arrow_down: |
   | [...pache/uniffle/server/ShuffleServerGrpcMetrics.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlU2VydmVyR3JwY01ldHJpY3MuamF2YQ==) | `100.00% <0.00%> (ø)` | |
   | [...fle/coordinator/metric/CoordinatorGrpcMetrics.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvbWV0cmljL0Nvb3JkaW5hdG9yR3JwY01ldHJpY3MuamF2YQ==) | `100.00% <0.00%> (ø)` | |
   | [...pache/hadoop/mapreduce/task/reduce/RssFetcher.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LW1yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9oYWRvb3AvbWFwcmVkdWNlL3Rhc2svcmVkdWNlL1Jzc0ZldGNoZXIuamF2YQ==) | | |
   | [.../java/org/apache/hadoop/mapreduce/RssMRConfig.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LW1yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9oYWRvb3AvbWFwcmVkdWNlL1Jzc01SQ29uZmlnLmphdmE=) | | |
   | [...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LW1yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9oYWRvb3AvbWFwcmVkdWNlL3YyL2FwcC9Sc3NNUkFwcE1hc3Rlci5qYXZh) | | |
   | [...mapreduce/task/reduce/RssInMemoryRemoteMerger.java](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LW1yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9oYWRvb3AvbWFwcmVkdWNlL3Rhc2svcmVkdWNlL1Jzc0luTWVtb3J5UmVtb3RlTWVyZ2VyLmphdmE=) | | |
   | ... and [11 more](https://codecov.io/gh/apache/incubator-uniffle/pull/540?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on pull request #540: [operator] fix error kind of ownerreference

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#issuecomment-1413597195

   Thanks @wangao1236, merging this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] wangao1236 commented on a diff in pull request #540: [operator] fix error kind of ownerreference

Posted by "wangao1236 (via GitHub)" <gi...@apache.org>.
wangao1236 commented on code in PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#discussion_r1094238617


##########
deploy/kubernetes/operator/pkg/controller/util/util.go:
##########
@@ -44,11 +44,12 @@ func AddOwnerReference(meta *metav1.ObjectMeta, rss *v1alpha1.RemoteShuffleServi
 func generateOwnerReference(rss *v1alpha1.RemoteShuffleService) []metav1.OwnerReference {
 	return []metav1.OwnerReference{
 		{
-			APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			Kind:       "RSS",
-			Name:       rss.Name,
-			UID:        rss.UID,
-			Controller: pointer.Bool(true),
+			APIVersion:         v1alpha1.SchemeGroupVersion.String(),
+			Kind:               "RemoteShuffleService",
+			BlockOwnerDeletion: pointer.Bool(true),

Review Comment:
   I thought about it and decided to behave the same way as the k8s controller.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #540: [operator] fix error kind of ownerreference

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#discussion_r1094305715


##########
deploy/kubernetes/operator/pkg/controller/util/util.go:
##########
@@ -44,11 +44,12 @@ func AddOwnerReference(meta *metav1.ObjectMeta, rss *v1alpha1.RemoteShuffleServi
 func generateOwnerReference(rss *v1alpha1.RemoteShuffleService) []metav1.OwnerReference {
 	return []metav1.OwnerReference{
 		{
-			APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			Kind:       "RSS",
-			Name:       rss.Name,
-			UID:        rss.UID,
-			Controller: pointer.Bool(true),
+			APIVersion:         v1alpha1.SchemeGroupVersion.String(),
+			Kind:               "RemoteShuffleService",
+			BlockOwnerDeletion: pointer.Bool(true),

Review Comment:
   OK,good point



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] wangao1236 commented on a diff in pull request #540: [operator] fix error kind of ownerreference

Posted by "wangao1236 (via GitHub)" <gi...@apache.org>.
wangao1236 commented on code in PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#discussion_r1094353457


##########
deploy/kubernetes/operator/pkg/controller/controller/rss.go:
##########
@@ -755,7 +755,7 @@ func (r *rssController) enqueueShuffleServer(obj interface{}) {
 func (r *rssController) removeFinalizer(rss *unifflev1alpha1.RemoteShuffleService) error {
 	rssCopy := rss.DeepCopy()
 	var finalizers []string
-	for _, f := range finalizers {
+	for _, f := range rssCopy.Finalizers {

Review Comment:
   Ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #540: [operator] fix error kind of ownerreference

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#discussion_r1094215919


##########
deploy/kubernetes/operator/pkg/controller/util/util.go:
##########
@@ -44,11 +44,12 @@ func AddOwnerReference(meta *metav1.ObjectMeta, rss *v1alpha1.RemoteShuffleServi
 func generateOwnerReference(rss *v1alpha1.RemoteShuffleService) []metav1.OwnerReference {
 	return []metav1.OwnerReference{
 		{
-			APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			Kind:       "RSS",
-			Name:       rss.Name,
-			UID:        rss.UID,
-			Controller: pointer.Bool(true),
+			APIVersion:         v1alpha1.SchemeGroupVersion.String(),
+			Kind:               "RemoteShuffleService",

Review Comment:
   Could you put the `"RemoteShuffleService"` in the constant package?
   And add a comment for why rss.Kind isn't used.



##########
deploy/kubernetes/operator/pkg/controller/controller/rss.go:
##########
@@ -755,7 +755,7 @@ func (r *rssController) enqueueShuffleServer(obj interface{}) {
 func (r *rssController) removeFinalizer(rss *unifflev1alpha1.RemoteShuffleService) error {
 	rssCopy := rss.DeepCopy()
 	var finalizers []string
-	for _, f := range finalizers {
+	for _, f := range rssCopy.Finalizers {

Review Comment:
   is it possible to add a ut for the removeFinalizer method?



##########
deploy/kubernetes/operator/pkg/controller/util/util.go:
##########
@@ -44,11 +44,12 @@ func AddOwnerReference(meta *metav1.ObjectMeta, rss *v1alpha1.RemoteShuffleServi
 func generateOwnerReference(rss *v1alpha1.RemoteShuffleService) []metav1.OwnerReference {
 	return []metav1.OwnerReference{
 		{
-			APIVersion: v1alpha1.SchemeGroupVersion.String(),
-			Kind:       "RSS",
-			Name:       rss.Name,
-			UID:        rss.UID,
-			Controller: pointer.Bool(true),
+			APIVersion:         v1alpha1.SchemeGroupVersion.String(),
+			Kind:               "RemoteShuffleService",
+			BlockOwnerDeletion: pointer.Bool(true),

Review Comment:
   is this necessary?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy merged pull request #540: [operator] fix error kind of ownerreference

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy merged PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on pull request #540: [operator] fix error kind of ownerreference

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on PR #540:
URL: https://github.com/apache/incubator-uniffle/pull/540#issuecomment-1413375055

   Hi @wangao1236 ao, could you help also edit the PR summary here to fill the contents:?
   ```
   Why are the changes needed?
   Does this PR introduce any user-facing change?
   How was this patch tested?
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org