Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Issue 2328023003: Fix Annotee stream name generation. (Closed)

Created:
4 years, 3 months ago by dnj
Modified:
4 years, 3 months ago
Reviewers:
iannucci, hinoka
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, andrew.wang, todd, tandrii+luci-go_chromium.org, M-A Ruel
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Fix Annotee stream name generation. Annotee was encountering two major problems related to nesting. Nesting is, unfortunately, implemented as two independent annotation events, one to select/seed the step and one to change its nest level from the default, 0. The first problem arose when Annotee is configured to echo annotations. It will be created as "A", a root step, and echo that annotation to a stream named after "A". Then its nest level will change, and it will echo the nest level annotation to "B", its new name. If "A" equals "B", we get a stream name conflict. Also, the "A" stream is totally junk. To address this, we now write ALL annotations to the root stream, not the stream in which they occurred. This does not affect the tee'd output, which will still receive the annotations in the order in which they are emitted. The second problem is that the "canonical name" was implemented very lazily (originally for logging), but used for real things. This caused any number of opportunities where two steps could have the same canonical name. We remove this altogether, tracking steps directly and using their log name base as a disambiguating factor. This means that even if two steps with the same name exist, they will be given differnt log names. BUG=chromium:646370 TEST=local Committed: https://github.com/luci/luci-go/commit/ee7b181c8d08b2b518be4659421a03f7a2afacce

Patch Set 1 #

Patch Set 2 : Remove debugging junk. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -296 lines) Patch
M logdog/client/annotee/annotation/annotation.go View 9 chunks +46 lines, -38 lines 0 comments Download
M logdog/client/annotee/annotation/annotation_test.go View 7 chunks +12 lines, -13 lines 0 comments Download
M logdog/client/annotee/annotation/test_data/coverage.annotations.txt View 2 chunks +6 lines, -4 lines 0 comments Download
M logdog/client/annotee/annotation/test_data/nested.annotations.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/coverage_base.proto.txt View 3 chunks +9 lines, -3 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/coverage_base_steps_bar_0_logs_logging_json_0.txt View 1 chunk +0 lines, -4 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/coverage_base_steps_bar_0_logs_lorem_txt_0.txt View 1 chunk +0 lines, -2 lines 0 comments Download
A logdog/client/annotee/annotation/test_expectations/coverage_base_steps_baz_qux_0_logs_content_0.txt View 1 chunk +1 line, -0 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/coverage_base_steps_foo_0_steps_bar_0_logs_logging_json_0.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/coverage_base_steps_foo_0_steps_bar_0_logs_lorem_txt_0.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/coverage_steps.proto.txt View 1 chunk +0 lines, -104 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/default_base.proto.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/default_testcommand.proto.txt View 1 chunk +0 lines, -22 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/nested_base.proto.txt View 1 chunk +18 lines, -0 lines 0 comments Download
A logdog/client/annotee/annotation/test_expectations/nested_base_steps_nesting_parent_0_steps_nesting_child0_0_steps_grandchild_0_logs_content_0.txt View 1 chunk +2 lines, -0 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/nested_steps.proto.txt View 1 chunk +0 lines, -56 lines 0 comments Download
A + logdog/client/annotee/annotation/test_expectations/timestamps_base.proto.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
D logdog/client/annotee/annotation/test_expectations/timestamps_steps.proto.txt View 1 chunk +0 lines, -34 lines 0 comments Download
M logdog/client/annotee/processor.go View 1 10 chunks +46 lines, -20 lines 0 comments Download

Messages

Total messages: 8 (4 generated)
dnj
PTAL. Note that this does not affect Milo expectation tests.
4 years, 3 months ago (2016-09-10 03:31:17 UTC) #2
hinoka
lgtm sorry for the delay
4 years, 3 months ago (2016-09-13 20:38:06 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2328023003/20001
4 years, 3 months ago (2016-09-13 20:54:40 UTC) #6
commit-bot: I haz the power
4 years, 3 months ago (2016-09-13 21:05:13 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://github.com/luci/luci-go/commit/ee7b181c8d08b2b518be4659421a03f7a2afacce

Powered by Google App Engine
This is Rietveld 408576698