New issue
Advanced search Search tips

Issue 807146 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Network traffic annotation failures

Project Member Reported by jam@chromium.org, Jan 30 2018

Issue description

I've disabled this step as it's failing again
https://chromium-review.googlesource.com/c/chromium/src/+/892383

see

https://ci.chromium.org/buildbot/tryserver.chromium.linux/linux_chromium_rel_ng/634904
https://ci.chromium.org/buildbot/tryserver.chromium.linux/linux_chromium_rel_ng/634934
https://ci.chromium.org/buildbot/tryserver.chromium.linux/linux_chromium_rel_ng/634954

which fail with
Returned error text: Traceback (most recent call last):
  File "/b/c/b/linux/src/tools/clang/scripts/run_tool.py", line 315, in <module>
    sys.exit(main())
  File "/b/c/b/linux/src/tools/clang/scripts/run_tool.py", line 281, in main
    f.write(compile_db.GenerateWithNinja(args.p))
  File "/b/c/b/linux/src/tools/clang/pylib/clang/compile_db.py", line 94, in GenerateWithNinja
    GetNinjaPath(), '-C', path, '-t', 'compdb', 'cc', 'cxx', 'objc',
  File "/b/c/b/linux/src/tools/clang/pylib/clang/compile_db.py", line 76, in GetNinjaPath
    os.path.dirname(os.realpath(__file__)), '..', '..', '..', 'third_party',
AttributeError: 'module' object has no attribute 'realpath'
 
Cc: msramek@chromium.org dpranke@chromium.org
Status: Started (was: Assigned)
The reasons:

1- "compile_db.py" was updated yesterday in crrev.com/c/889994, and it fails when it's called from traffic annotation auditor. This failure is not caught in presubmit checks because traffic annotation auditor filters the changed files that are not directly related to annotations, to increase speed.

2- Traffic annotation auditor is called in 'error resilient' mode from presubmit check so that these sort of errors would not block submit, but there was a bug in presubmit_check.py which treated error text with error code 0 as error.


Solution:

1- Solving compile_db.py's failure.
2- Solving the bug in presubmit_check.py to avoid returning error in such cases.
3- Adding a non-error-resilient test somewhere to ensure that when such problems happen, we are notified and traffic annotation auditor doesn't just silently fail.
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b695a4881858d817c41ef3bb242c8d4a39805cf0

commit b695a4881858d817c41ef3bb242c8d4a39805cf0
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Tue Jan 30 10:33:57 2018

Fix error sensitivity in traffic annotation presubmit check.

Network traffic annotations presubmit check returned an error if there
was run-time errors.
This was not an intended behavior as in error resilient mode, there
might be some run time errors that will not block the CL from landing.
The script is updated to return the exit code that auditor returns in
all cases.

Bug:  690323 
Bug:  807146 
Change-Id: Ic5a34511a78a3607b5e2071b267180236e88f358
Reviewed-on: https://chromium-review.googlesource.com/892858
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532829}
[modify] https://crrev.com/b695a4881858d817c41ef3bb242c8d4a39805cf0/tools/traffic_annotation/scripts/check_annotations.py

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e990634ec44bfe81ecaf86c026dc0987d5c4f407

commit e990634ec44bfe81ecaf86c026dc0987d5c4f407
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Tue Jan 30 16:22:32 2018

Fix tools/clang/pylib/clang/compile_db.py.

GetNinjaPath() function in 'tools/clang/pylib/clang/compile_db.py'
did not return the path to ninja correctly. This is fixed.

Bug:  807146 
Change-Id: Ie149b4d5a2684454b6fdbbd59598421e008136fd
Reviewed-on: https://chromium-review.googlesource.com/892918
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532903}
[modify] https://crrev.com/e990634ec44bfe81ecaf86c026dc0987d5c4f407/tools/clang/pylib/clang/compile_db.py

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f66d3495f4f9836548d5262bf47a3f959dc4caaf

commit f66d3495f4f9836548d5262bf47a3f959dc4caaf
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Wed Jan 31 06:36:54 2018

Activate Network Traffic Annotations trybot test on Linux.

After fixing the following two files, the trybot test on Linux are
reactivated:
'tools/clang/pylib/clang/compile_db.py'
'tools/traffic_annotation/scripts/check_annotations.py'

Bug:  690323 
Bug:  807146 
Change-Id: Id769e4bb4e5d416eb04e2436d38cec5af04606ec
Reviewed-on: https://chromium-review.googlesource.com/891960
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533218}
[modify] https://crrev.com/f66d3495f4f9836548d5262bf47a3f959dc4caaf/tools/traffic_annotation/scripts/check_annotations.py

Status: Fixed (was: Started)
1) The bug in complie_db.py is solved.
2) check_annotations.py is fixed so that it won't return error if auditor has error text, but 0 exit code.
3) Trybot is reactivated and monitored to have no more hiccups.

==> Marking Fixed.

Sign in to add a comment