Skip to content
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

[aggregator] Remove msgpack support #2894

Merged
merged 6 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/aggregator/integration/integration_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,7 @@ func (mu metricUnion) ID() metricid.RawID {
type metadataType int

const (
policiesListType metadataType = iota
stagedMetadatasType
stagedMetadatasType metadataType = iota
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just sanity checking that these values aren't used externally - otherwise we should _ this first one to maintain the existing iota values

forwardMetadataType
timedMetadataType
passthroughMetadataType
Expand Down
11 changes: 2 additions & 9 deletions src/aggregator/server/rawtcp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ var (
SourceID: 1234,
NumForwardedTimes: 3,
}
testPassthroughStoragePolicy = policy.NewStoragePolicy(time.Minute, xtime.Minute, 12*time.Hour)
testCounterWithPoliciesList = unaggregated.CounterWithPoliciesList{
Counter: testCounter.Counter(),
PoliciesList: testDefaultPoliciesList,
}
testPassthroughStoragePolicy = policy.NewStoragePolicy(time.Minute, xtime.Minute, 12*time.Hour)
testBatchTimerWithPoliciesList = unaggregated.BatchTimerWithPoliciesList{
BatchTimer: testBatchTimer.BatchTimer(),
PoliciesList: testCustomPoliciesList,
Expand Down Expand Up @@ -220,7 +216,6 @@ func TestRawTCPServerHandleUnaggregatedProtobufEncoding(t *testing.T) {
conn, err := net.Dial("tcp", listener.Addr().String())
require.NoError(t, err)

var stream []byte
encoder := protobuf.NewUnaggregatedEncoder(protobuf.NewUnaggregatedOptions())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: after these changes, stream doesn't need to be declared until below when it's actually assigned

require.NoError(t, encoder.EncodeMessage(encoding.UnaggregatedMessageUnion{
Type: encoding.CounterWithMetadatasType,
Expand All @@ -246,10 +241,8 @@ func TestRawTCPServerHandleUnaggregatedProtobufEncoding(t *testing.T) {
Type: encoding.ForwardedMetricWithMetadataType,
ForwardedMetricWithMetadata: testForwardedMetricWithMetadata,
}))
buf := encoder.Relinquish()
stream = buf.Bytes()

_, err = conn.Write(stream)
_, err = conn.Write(encoder.Relinquish().Bytes())
require.NoError(t, err)
}()
}
Expand Down