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

Fix awslogs driver repeating last event - #34292 #34296

Merged

Conversation

mixja
Copy link
Contributor

@mixja mixja commented Jul 28, 2017

Signed-off-by: Justin Menga justin.menga@gmail.com

- What I did

Fixes #34292

- How I did it

Ensure event buffer used for storing log events is properly flushed

- How to verify it

The modifications to the test case in this PR fail with the old code and pass with the new code.

See #34292 for details on how to replicate the issue (I have verified this is no longer an issue with this PR)

- Description for the changelog

Fix awslogs driver repeating last event

- A picture of a cute animal (not mandatory but encouraged)

scared-bug

Signed-off-by: Justin Menga <justin.menga@gmail.com>
@mixja
Copy link
Contributor Author

mixja commented Jul 28, 2017

cc @samuelkarp

Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing this!

@@ -641,14 +641,28 @@ func TestCollectBatchMultilinePatternMaxEventAge(t *testing.T) {
})

// Fire ticker batchPublishFrequency seconds later
ticks <- time.Now().Add(batchPublishFrequency * time.Second)
ticks <- time.Now().Add(batchPublishFrequency + time.Second)
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct? The comment leads me to believe it should be "* time.Second";

 // Fire ticker batchPublishFrequency seconds later

Copy link
Member

Choose a reason for hiding this comment

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

batchPublishFrequency is already a time.Duration (see line 40 in cloudwatchlogs.go), so the existing code was an error.

Copy link
Member

Choose a reason for hiding this comment

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

ah, makes sense (reading on my phone)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

ping @cpuguy83 PTAL

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

@thaJeztah thaJeztah added area/logging kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/4-merge and removed status/2-code-review labels Jul 31, 2017
@yongtang
Copy link
Member

All Jenkins tests passed. Merging.

@yongtang yongtang merged commit 63e4aa3 into moby:master Jul 31, 2017
@samuelkarp
Copy link
Member

@yongtang @thaJeztah Would this be cherry-picked into Docker 17.06.1-ce?

@thaJeztah
Copy link
Member

I opened an issue internally to consider backporting it yes. Not sure yet if it makes 17.06.1, otherwise it could be included in a .2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/4-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

awslogs driver repeating last event
5 participants