You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "cxzl25 (via GitHub)" <gi...@apache.org> on 2023/12/26 04:47:50 UTC
[PR] `EngineRef#deregister` should return the value [kyuubi]
cxzl25 opened a new pull request, #5921:
URL: https://github.com/apache/kyuubi/pull/5921
# :mag: Description
## Issue References ๐
This pull request fixes #
## Describe Your Solution ๐ง
1. Let `org.apache.kyuubi.engine.EngineRef#deregister` have a return value so that you can determine whether `deregister` is successful.
2. Fix a flaky test, add `eventually`, because there is a delay in delete, causing UT to fail.
```
- deregister engine with existing host port *** FAILED ***
Some(("localhost", 42445)) was not empty (EngineRefTests.scala:362)
```
https://github.com/apache/kyuubi/actions/runs/7320908364/job/19940635471
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
flaky test
https://github.com/apache/kyuubi/actions/runs/7320908364/job/19940635471
#### Behavior With This Pull Request :tada:
GA
#### Related Unit Tests
EngineRefTests.scala
"deregister engine with existing host port"
---
# Checklists
## ๐ Author Self Checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project
- [ ] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [ ] Pull request title is okay.
- [ ] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested
**Be nice. Be informative.**
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] `EngineRef#deregister` should return the value [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5921:
URL: https://github.com/apache/kyuubi/pull/5921#discussion_r1436288538
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -313,18 +313,25 @@ private[kyuubi] class EngineRef(
* @param discoveryClient the zookeeper client to get or create engine instance
* @param hostPort the existing engine host and port
*/
- def deregister(discoveryClient: DiscoveryClient, hostPort: (String, Int)): Unit =
+ def deregister(discoveryClient: DiscoveryClient, hostPort: (String, Int)): (String, Boolean) =
Review Comment:
can we invert the order of return value? `(Boolean, String)`
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] `EngineRef#deregister` should return the value [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #5921: `EngineRef#deregister` should return the value
URL: https://github.com/apache/kyuubi/pull/5921
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] `EngineRef#deregister` should return the value [kyuubi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5921:
URL: https://github.com/apache/kyuubi/pull/5921#issuecomment-1869285060
## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `3 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`86bec4d`)](https://app.codecov.io/gh/apache/kyuubi/commit/86bec4d914cc0de089b5183f87e3a45ade9d60e3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 61.61% compared to head [(`c61bfbe`)](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 61.50%.
| [Files](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvRW5naW5lUmVmLnNjYWxh) | 66.66% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #5921 +/- ##
============================================
- Coverage 61.61% 61.50% -0.12%
Complexity 23 23
============================================
Files 616 616
Lines 36387 36393 +6
Branches 4978 4978
============================================
- Hits 22419 22382 -37
- Misses 11557 11588 +31
- Partials 2411 2423 +12
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/kyuubi/pull/5921?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] `EngineRef#deregister` should return the value [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #5921:
URL: https://github.com/apache/kyuubi/pull/5921#issuecomment-1871958429
Thanks, merged to master
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] `EngineRef#deregister` should return the value [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5921:
URL: https://github.com/apache/kyuubi/pull/5921#discussion_r1436288206
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -313,18 +313,25 @@ private[kyuubi] class EngineRef(
* @param discoveryClient the zookeeper client to get or create engine instance
* @param hostPort the existing engine host and port
*/
Review Comment:
javadoc for return value
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org