Skip to content

Commit

Permalink
[fix] Fix incorrect usage of iter package in aggregator (jaegertracin…
Browse files Browse the repository at this point in the history
…g#6403)

## Description of the changes
- jaegertracing#6401 was accidentally
using the official `iter` package instead of the internal one. This PR
fixes that usage.
- Added a linter rule so we don't accidentally use the official package
again until we upgrade to Go 1.23

## How was this change tested?
- CI

## 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: Mahad Zaryab <mahadzaryab1@gmail.com>
  • Loading branch information
mahadzaryab1 authored Dec 25, 2024
1 parent ba6228f commit 1677650
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ linters-settings:
files:
- "!**/jptrace/**"

# TODO: remove once we have upgraded to Go 1.23
disallow-iter:
deny:
- pkg: iter
desc: "Use github.com/jaegertracing/jaeger/pkg/iter"
files:
- "**"

goimports:
local-prefixes: github.com/jaegertracing/jaeger
gosec:
Expand Down
4 changes: 2 additions & 2 deletions internal/jptrace/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package jptrace

import (
"iter"

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"

"github.com/jaegertracing/jaeger/pkg/iter"
)

// AggregateTraces aggregates a sequence of trace batches into individual traces.
Expand Down

0 comments on commit 1677650

Please sign in to comment.