Commit 610a978e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31363 from rmmh/5day-update

Automatic merge from submit-queue Get 5 days of test history when updating test owners.
parents 40efde7e 23fb96b0
...@@ -33,8 +33,9 @@ SKIP_MAINTAINERS = { ...@@ -33,8 +33,9 @@ SKIP_MAINTAINERS = {
'a-robinson', 'aronchick', 'bgrant0607-nocc', 'david-mcmahon', 'a-robinson', 'aronchick', 'bgrant0607-nocc', 'david-mcmahon',
'goltermann', 'sarahnovotny'} 'goltermann', 'sarahnovotny'}
def get_test_history(): def get_test_history(days_ago):
url = time.strftime(GCS_URL_BASE + 'logs/%Y-%m-%d.json') url = time.strftime(GCS_URL_BASE + 'logs/%Y-%m-%d.json',
time.gmtime(time.time() - days_ago * 24 * 60 * 60))
resp = urllib2.urlopen(url) resp = urllib2.urlopen(url)
content = resp.read() content = resp.read()
if resp.headers.get('content-encoding') == 'gzip': if resp.headers.get('content-encoding') == 'gzip':
...@@ -97,9 +98,12 @@ def get_maintainers(): ...@@ -97,9 +98,12 @@ def get_maintainers():
def main(): def main():
test_history = get_test_history() test_names = set()
test_names = sorted(set(map(normalize, test_history['test_names']))) for days_ago in range(4):
test_names.append('DEFAULT') test_history = get_test_history(days_ago)
test_names.update(normalize(name) for name in test_history['test_names'])
test_names.add('DEFAULT')
test_names = sorted(test_names)
owners = load_owners(OWNERS_PATH) owners = load_owners(OWNERS_PATH)
outdated_tests = sorted(set(owners) - set(test_names)) outdated_tests = sorted(set(owners) - set(test_names))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment