You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "peachisai (via GitHub)" <gi...@apache.org> on 2025/11/06 13:01:48 UTC
[PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
peachisai opened a new pull request, #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839
<!--
β οΈ Please make sure to read this template first, pull requests that don't accord with this template
maybe closed without notice.
Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
-->
<!-- ==== π Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist π ====
### Fix <bug description or the bug issue number or bug issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.
==== π Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist π ==== -->
<!-- ==== π Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist π ====
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
==== π Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist π ==== -->
- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Fixes apache/skywalking#<issue number>.
- [x] Update the [`CHANGES` log](https://github.com/apache/skywalking-banyandb/blob/main/CHANGES.md).
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839#discussion_r2498904625
##########
banyand/measure/topn_test.go:
##########
@@ -82,10 +100,11 @@ func TestTopNValue_MarshalUnmarshal(t *testing.T) {
require.NoError(t, err)
// Compare the original and decoded topNValue
- require.Equal(t, tt.topNVal.valueName, tt.topNVal.valueName)
- require.Equal(t, tt.topNVal.entityTagNames, tt.topNVal.entityTagNames)
- require.Equal(t, tt.topNVal.values, tt.topNVal.values)
- require.Equal(t, tt.topNVal.entities, tt.topNVal.entities)
+ require.Equal(t, originalValueName, tt.topNVal.valueName)
+ require.Equal(t, originalEntityTagNames, tt.topNVal.entityTagNames)
+ require.Equal(t, originalValues, tt.topNVal.values)
+ require.Empty(t, cmp.Diff(originalEntities, tt.topNVal.entities, protocmp.Transform()))
Review Comment:
[nitpick] Consider using `require.Equal(t, originalEntities, tt.topNVal.entities, protocmp.Transform())` instead of checking for an empty diff. This provides more consistent API usage with the other assertions and clearer failure messages showing what values differ, rather than showing the diff output.
```suggestion
require.True(t, cmp.Equal(originalEntities, tt.topNVal.entities, protocmp.Transform()), "entities differ: %s", cmp.Diff(originalEntities, tt.topNVal.entities, protocmp.Transform()))
```
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839#issuecomment-3497235984
Please fix lint and copliot comments.
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
Posted by "peachisai (via GitHub)" <gi...@apache.org>.
peachisai commented on PR #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839#issuecomment-3497240060
> Please fix lint and copliot comments.
done
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix comparison issues in TopN test cases [skywalking-banyandb]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #839:
URL: https://github.com/apache/skywalking-banyandb/pull/839#issuecomment-3497375898
## [Codecov](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/839?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 31.87%. Comparing base ([`3530dd9`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/3530dd9b5cefaa4fef60eec91ecbfbdfcaf243c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f659160`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/f659160a5e7002ad0eabd581ea21126461562a32?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 23 commits behind head on main.
> :exclamation: There is a different number of reports uploaded between BASE (3530dd9) and HEAD (f659160). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (3530dd9) | HEAD (f659160) |
>|------|------|------|
>||1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #839 +/- ##
===========================================
- Coverage 45.97% 31.87% -14.11%
===========================================
Files 328 94 -234
Lines 55505 9732 -45773
===========================================
- Hits 25520 3102 -22418
+ Misses 27909 6331 -21578
+ Partials 2076 299 -1777
```
| [Flag](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/839/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ | |
|---|---|---|
| [pkg](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/839/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `31.87% <ΓΈ> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/839?dropdown=coverage&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).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org