beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-5240) Create post-commit tests dashboard
Date Thu, 20 Sep 2018 00:00:42 GMT


ASF GitHub Bot logged work on BEAM-5240:

                Author: ASF GitHub Bot
            Created on: 20/Sep/18 00:00
            Start Date: 20/Sep/18 00:00
    Worklog Time Spent: 10m 
      Work Description: Ardagan commented on a change in pull request #6277: [BEAM-5240] Add
metrics dashboard deployment script and logic

 File path: .test-infra/metrics/sync/jenkins/
 @@ -0,0 +1,204 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# Queries Jenkins to collect metrics and pu them in bigquery.
+import os
+import psycopg2
+import re
+import requests
+import socket
+import sys
+import time
+from datetime import datetime, timedelta
+from xml.etree import ElementTree
+# Keeping this as reference for localhost debug
+# Fetching docker host machine ip for testing purposes.
+# Actual host should be used for production.
+# import subprocess
+# cmd_out = subprocess.check_output(["ip", "route", "show"]).decode("utf-8")
+# host = cmd_out.split(" ")[2]
+host = os.environ['JENSYNC_HOST']
+port = os.environ['JENSYNC_PORT']
+dbname = os.environ['JENSYNC_DBNAME']
+dbusername = os.environ['JENSYNC_DBUSERNAME']
+dbpassword = os.environ['JENSYNC_DBPWD']
+jenkinsBuildsTableName = 'jenkins_builds'
+jenkinsJobsCreateTableQuery = f"""
+create table {jenkinsBuildsTableName} (
+job_name varchar NOT NULL,
+build_id integer NOT NULL,
+build_url varchar,
+build_result varchar,
+build_timestamp TIMESTAMP,
+build_builtOn varchar,
+build_duration integer,
+build_estimatedDuration integer,
+build_fullDisplayName varchar,
+timing_blockedDurationMillis integer,
+timing_buildableDurationMillis integer,
+timing_buildingDurationMillis integer,
+timing_executingTimeMillis integer,
+timing_queuingDurationMillis integer,
+timing_totalDurationMillis integer,
+timing_waitingDurationMillis integer,
+primary key(job_name, build_id)
+# returns (jobName, lastBuildId, jobUrl)
+def fetchJobs():
+  url = '[name,url,lastCompletedBuild[id]]&depth=1'
 Review comment:
   I'm not really clear what comment should I add here.
   This is a standard json api request for Jenkins. I don't believe it makes sense to list
whole set of data you can get via similar requests because it is plugin-dependent and most
of it is not relevant at current stage of the code. Anyone can get full list of data by omitting
tree filter.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 145874)
    Time Spent: 2h 10m  (was: 2h)

> Create post-commit tests dashboard
> ----------------------------------
>                 Key: BEAM-5240
>                 URL:
>             Project: Beam
>          Issue Type: Sub-task
>          Components: testing
>            Reporter: Mikhail Gryzykhin
>            Assignee: Mikhail Gryzykhin
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h

This message was sent by Atlassian JIRA

View raw message