You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/09 17:41:04 UTC

[GitHub] [beam] kileys commented on a diff in pull request #21771: Update dashboards to use gh issues data instead of jira data

kileys commented on code in PR #21771:
URL: https://github.com/apache/beam/pull/21771#discussion_r893790089


##########
.test-infra/metrics/grafana/dashboards/source_data_freshness.json:
##########
@@ -104,7 +104,7 @@
           "hide": false,
           "metricColumn": "build_result",
           "rawQuery": true,
-          "rawSql": "WITH sources AS (\n  SELECT\n    'Jenkins' as source,\n    MAX(build_timestamp + make_interval(secs:= timing_executingtimemillis / 1000.0)) AS last_sync\n  FROM jenkins_builds\n  UNION SELECT\n    'JIRA' as source,\n    lastsynctime AS last_sync\n  FROM jira_issues_metadata\n  UNION SELECT\n    'GitHub' as source,\n    timestamp AS last_sync\n  FROM gh_sync_metadata\n)\nSELECT\n  current_timestamp AS time,\n  source,\n  EXTRACT(EPOCH FROM age(current_timestamp, last_sync)) / (60) AS value\nFROM sources",
+          "rawSql": "WITH sources AS (\n  SELECT\n    'Jenkins' as source,\n    MAX(build_timestamp + make_interval(secs:= timing_executingtimemillis / 1000.0)) AS last_sync\n  FROM jenkins_builds\n  UNION SELECT\n    'GitHub Issues ' as source,\n    timestamp AS last_sync\n  FROM gh_sync_metadata\n  WHERE name = 'gh_issue_sync'\n  UNION SELECT\n    'GitHub Pull Requests ' as source,\n    timestamp AS last_sync\n  FROM gh_sync_metadata\n  WHERE name = 'gh_pr_sync')\nSELECT\n  current_timestamp AS time,\n  source,\n  EXTRACT(EPOCH FROM age(current_timestamp, last_sync)) / (60) AS value\nFROM sources",

Review Comment:
   ```suggestion
             "rawSql": "WITH sources AS (\n  SELECT\n    'Jenkins' as source,\n    MAX(build_timestamp + make_interval(secs:= timing_executingtimemillis / 1000.0)) AS last_sync\n  FROM jenkins_builds\n  UNION SELECT\n    'GitHub Issues' as source,\n    timestamp AS last_sync\n  FROM gh_sync_metadata\n  WHERE name = 'gh_issue_sync'\n  UNION SELECT\n    'GitHub Pull Requests' as source,\n    timestamp AS last_sync\n  FROM gh_sync_metadata\n  WHERE name = 'gh_pr_sync')\nSELECT\n  current_timestamp AS time,\n  source,\n  EXTRACT(EPOCH FROM age(current_timestamp, last_sync)) / (60) AS value\nFROM sources",
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org