beam-commits mailing list archives

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

     [ https://issues.apache.org/jira/browse/BEAM-5240?focusedWorklogId=145874&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-145874
]

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
URL: https://github.com/apache/beam/pull/6277#discussion_r219000284
 
 

 ##########
 File path: .test-infra/metrics/sync/jenkins/syncjenkins.py
 ##########
 @@ -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
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+
+# 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 = 'https://builds.apache.org/view/A-D/view/Beam/api/json?tree=jobs[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:
users@infra.apache.org


Issue Time Tracking
-------------------

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

> Create post-commit tests dashboard
> ----------------------------------
>
>                 Key: BEAM-5240
>                 URL: https://issues.apache.org/jira/browse/BEAM-5240
>             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
(v7.6.3#76005)

Mime
View raw message