-
Notifications
You must be signed in to change notification settings - Fork 33
Only increment counts when we acknowledge #372
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
Conversation
| acknowledged, _ = redis.pipelined do |pipeline| | ||
| @queue.acknowledge(id, error: payload, pipeline: pipeline) | ||
| record_stats(stats, pipeline: pipeline) | ||
| acknowledged = @queue.acknowledge(id, error: payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisBr Do we still need to move the counting to after recording?
if test.requeued?
self.requeues += 1
elsif test.skipped?
self.skips += 1
elsif test.error?
self.errors += 1
elsif test.failure
self.failures += 1
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because we only count on acknowledge. Counting / success requeue always is fine, errors are problematic.
| record_stats(stats, pipeline: pipeline) | ||
| acknowledged = @queue.acknowledge(id, error: payload) | ||
| if acknowledged == 1 | ||
| record_stats(stats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only record stats on failure if this worker actually acknowledged
a6ae8cb to
3f3dd19
Compare
3f3dd19 to
928f0b2
Compare
| record_stats(stats) | ||
| @queue.increment_test_failed | ||
| else | ||
| record_stats({"ignored" => 1}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love just updating ignored but it should be fine.
| if acknowledged | ||
| record_stats(stats) | ||
| else | ||
| record_stats({"ignored" => 1}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love just updating ignored but it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking more, this is wrong because it would only ever set 1.
|
Superseded by #373 We already log the lost tests to warnings. |
When a test times out and gets executed by another worker and then worker 1 succeeds and worker 2 fails we will acknowledge the success (and ignore the failure). However, we do still count failure in the global counter which can cause some confusion in the log output.
Just to clarify, the overall build result is correct, just the log output is confusing.