Skip to content

Commit 83a7cb3

Browse files
(chore): prepare for 1.0.0-beta6 (#169)
* prepare for 1.0.0-beta6 * if batch size and queue size are miss matched, set to defaults instead of swapping * fix unit test * fix change log to include all features and fixes since last release * add config manager fix * fix PR number in last PR fix * missed a test from EP update
1 parent 56b8e59 commit 83a7cb3

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

CHANGELOG.MD

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
Changes that have landed but are not yet released. Changes that have landed but are not yet released.
99

10+
## [1.0.0-beta6] - November 7th, 2019
11+
12+
## New Features
13+
14+
- Experiment override service - implement groups
15+
[#164](https://github.com/optimizely/go-sdk/pull/164)
16+
- Add User profile service
17+
[#163](https://github.com/optimizely/go-sdk/pull/163)
18+
19+
### Bug Fixes
20+
- Fix config managers so that they don't try and parse on error returned from CDN. [#170](https://github.com/optimizely/go-sdk/pull/170)
21+
- When event batch size has been reached only start one batch event processing go routine.
22+
- When queue size is met, log a message and do not add to the queue.
23+
- Duration used was setting the time too far into the future by multiplying by second and then by milliseconds. Flush interval is now any duration, default is 30 seconds. If you don't pass in a multiplier the duration created is in microseconds.
24+
[#167](https://github.com/optimizely/go-sdk/pull/167)
25+
- fixed parsing for audience conditions.
26+
[#165] (https://github.com/optimizely/go-sdk/pull/165)
27+
- Check nil to prevent panic. [#162] (https://github.com/optimizely/go-sdk/pull/162)
28+
- fix: support audience ids. [#161] (https://github.com/optimizely/go-sdk/pull/161)
29+
1030
## [1.0.0-beta5] - October 30th, 2019
1131

1232
### Bug Fixes

pkg/event/processor.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ func NewBatchEventProcessor(options ...BPOptionConfig) *BatchEventProcessor {
129129
}
130130

131131
if p.BatchSize > p.MaxQueueSize {
132-
pLogger.Warning("Batch size is larger than queue size. Swapping")
133-
p.BatchSize, p.MaxQueueSize = p.MaxQueueSize, p.BatchSize
132+
pLogger.Warning(
133+
fmt.Sprintf("Batch size %d is larger than queue size %d. Setting to defaults",
134+
p.BatchSize, p.MaxQueueSize))
135+
136+
p.BatchSize = DefaultBatchSize
137+
p.MaxQueueSize = defaultQueueSize
134138
}
135139

136140
if p.Q == nil {

pkg/event/processor_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ func TestDefaultEventProcessor_BatchSizeLessThanQSize(t *testing.T) {
234234
WithQueue(NewInMemoryQueue(100)),
235235
WithEventDispatcher(NewMockDispatcher(100, false)))
236236

237-
assert.Equal(t, 2, processor.BatchSize)
238-
assert.Equal(t, 10, processor.MaxQueueSize)
237+
assert.Equal(t, DefaultBatchSize, processor.BatchSize)
238+
assert.Equal(t, defaultQueueSize, processor.MaxQueueSize)
239239

240240
}
241241

@@ -408,8 +408,10 @@ func TestChanQueueEventProcessor_ProcessImpression(t *testing.T) {
408408

409409
func TestChanQueueEventProcessor_ProcessBatch(t *testing.T) {
410410
exeCtx := utils.NewCancelableExecutionCtx()
411-
processor := NewBatchEventProcessor(WithQueueSize(100), WithFlushInterval(100),
412-
WithQueue(NewInMemoryQueue(100)), WithEventDispatcher(NewMockDispatcher(100, false)))
411+
processor := NewBatchEventProcessor(
412+
WithQueueSize(100),
413+
WithQueue(NewInMemoryQueue(100)),
414+
WithEventDispatcher(NewMockDispatcher(100, false)))
413415
processor.Start(exeCtx)
414416

415417
impression := BuildTestImpressionEvent()

0 commit comments

Comments
 (0)