Skip to content

Use empty slices instead of nil #6799

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

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

zhengkezhou1
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Added boundary case handling for empty fields during model conversion.

How was this change tested?

  • unit tests

Checklist

@zhengkezhou1 zhengkezhou1 requested a review from a team as a code owner March 4, 2025 06:30
@zhengkezhou1 zhengkezhou1 requested a review from jkowall March 4, 2025 06:30
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.03%. Comparing base (300cc7c) to head (98037cd).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6799      +/-   ##
==========================================
- Coverage   96.04%   96.03%   -0.01%     
==========================================
  Files         363      364       +1     
  Lines       20677    20700      +23     
==========================================
+ Hits        19859    19880      +21     
- Misses        624      626       +2     
  Partials      194      194              
Flag Coverage Δ
badger_v1 9.90% <100.00%> (+0.14%) ⬆️
badger_v2 1.98% <100.00%> (+0.16%) ⬆️
cassandra-4.x-v1-manual 14.94% <100.00%> (+0.13%) ⬆️
cassandra-4.x-v2-auto 1.97% <100.00%> (+0.16%) ⬆️
cassandra-4.x-v2-manual 1.97% <100.00%> (+0.16%) ⬆️
cassandra-5.x-v1-manual 14.94% <100.00%> (+0.13%) ⬆️
cassandra-5.x-v2-auto 1.97% <100.00%> (+0.16%) ⬆️
cassandra-5.x-v2-manual 1.97% <100.00%> (+0.16%) ⬆️
elasticsearch-6.x-v1 19.27% <100.00%> (+0.12%) ⬆️
elasticsearch-7.x-v1 19.35% <100.00%> (+0.12%) ⬆️
elasticsearch-8.x-v1 19.52% <100.00%> (+0.12%) ⬆️
elasticsearch-8.x-v2 1.98% <100.00%> (+0.16%) ⬆️
grpc_v1 10.95% <100.00%> (+0.14%) ⬆️
grpc_v2 7.95% <100.00%> (+0.15%) ⬆️
kafka-3.x-v1 10.20% <100.00%> (+0.07%) ⬆️
kafka-3.x-v2 1.98% <100.00%> (+0.16%) ⬆️
memory_v2 1.98% <100.00%> (+0.16%) ⬆️
opensearch-1.x-v1 19.40% <100.00%> (+0.12%) ⬆️
opensearch-2.x-v1 19.40% <100.00%> (+0.12%) ⬆️
opensearch-2.x-v2 1.98% <100.00%> (+0.16%) ⬆️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 94.92% <100.00%> (-0.01%) ⬇️

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.

@yurishkuro yurishkuro changed the title Improve: Translator use empty struct instead of nil pointer Use empty slices instesd of nil Mar 4, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Mar 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 4, 2025
@yurishkuro yurishkuro changed the title Use empty slices instesd of nil Use empty slices instead of nil Mar 4, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Mar 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Mar 5, 2025
Merged via the queue into jaegertracing:main with commit a048bc8 Mar 5, 2025
59 checks passed
@zhengkezhou1 zhengkezhou1 deleted the issues-6798 branch May 3, 2025 10:37
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?
- Resolves jaegertracing#6798

## Description of the changes
- Added boundary case handling for empty fields during model conversion.
## How was this change tested?
- unit tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

Signed-off-by: zzzk1 <[email protected]>
Signed-off-by: amol-verma-allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve: Translator use empty struct instead of nil pointer
2 participants