Skip to content
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

Merged
merged 5 commits into from
Aug 11, 2016

Conversation

rmmh
Copy link
Contributor

@rmmh rmmh commented Aug 11, 2016

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. See pr_glance_test.py for more usage information.

Ryan Hitchman added 2 commits August 10, 2016 16:35
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.
@rmmh rmmh added the area/gubernator Issues or PRs related to code in /gubernator label Aug 11, 2016
@@ -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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why [1:-1]?

Copy link
Contributor Author

@rmmh rmmh Aug 11, 2016

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.

@rmmh rmmh changed the title Link build results to testgrid. Link build results to testgrid (fixes #272). Aug 11, 2016
@rmmh rmmh force-pushed the g8r-testgrid branch 2 times, most recently from 1be771a to 61243cc Compare August 11, 2016 00:48


def get_config():
global _testgrid_config # pylint: disable=global-statement
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Ryan Hitchman added 2 commits August 10, 2016 18:21
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
@rmmh rmmh merged commit 00443b6 into kubernetes:master Aug 11, 2016
@rmmh rmmh deleted the g8r-testgrid branch August 22, 2016 20:13
ostromart pushed a commit to ostromart/test-infra that referenced this pull request Jul 26, 2019
grantr pushed a commit to grantr/test-infra that referenced this pull request Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gubernator Issues or PRs related to code in /gubernator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants