-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Link build results to testgrid (fixes #272). #372
Conversation
Also, delete some pr tests that were previously moved.
It handles basic field types and can give particular field numbers names. This is enough to parse the testgrid config.proto for what we need.
@@ -102,6 +102,7 @@ class BuildHandler(view_base.BaseHandler): | |||
def get(self, prefix, job, build): | |||
self.check_bucket(prefix) | |||
job_dir = '/%s/%s/' % (prefix, job) | |||
testgrid_query = testgrid.path_to_query(job_dir[1:-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.
Why [1:-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.
testgrid wants paths like 'kubernetes-jenkins/jobs/gce-e2e'
I can move this stripping into the path_to_query bit.
1be771a
to
61243cc
Compare
|
||
|
||
def get_config(): | ||
global _testgrid_config # pylint: disable=global-statement |
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.
Not a huge fan of this global.
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.
Do you have any preferences for alternatives?
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.
If you need it to be loaded once and then used multiple times then load it once at the start and then pass it to whoever uses it.
the Testgrid configuration protobuf and parsing it. The Testgrid configuration is cached in memory for the instance. There is no expiration/reloading functionality for these configurations-- instead, the assumption is that instances will restart every few hours, so the maximum staleness is negligible.
If there is a testgrid page for the job being considered, link to: - the testgrid tab showing all results for the job - the testgrid tab, filtered to only show results for a failing test
This makes it easy to view historical failures for a job or test.
The neatest / grossest thing here is in
pb_glance.py
-- a tiny protobuf parser in 40 lines of code. Seepr_glance_test.py
for more usage information.