Chromium Code Reviews
DescriptionFix 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. #Messages
Total messages: 8 (4 generated)
|