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

ASF GitHub Bot logged work on BEAM-5071:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Aug/18 21:51
            Start Date: 14/Aug/18 21:51
    Worklog Time Spent: 10m 
      Work Description: yifanzou commented on a change in pull request #6167: 
[BEAM-5071] Replace the bigquery with restful APIs to query dependenc…
URL: https://github.com/apache/beam/pull/6167#discussion_r210104988
 
 

 ##########
 File path: 
.test-infra/jenkins/dependency_check/dependency_check_report_generator.py
 ##########
 @@ -176,7 +187,77 @@ def compare_dependency_versions(curr_ver, latest_ver):
   return False
 
 
-def query_dependency_release_dates(bigquery_client, dep_name, 
curr_ver_in_beam, latest_ver):
+def find_release_time_from_maven_central(group_id, artifact_id, version):
+  """
+  Find release dates from Maven Central REST API.
+  Args:
+    group_id:
+    artifact_id:
+    version:
+  Return:
+    release date
+  """
+  url = 
"http://search.maven.org/solrsearch/select?q=g:{0}+AND+a:{1}+AND+v:{2}".format(
+      group_id,
+      artifact_id,
+      version)
+  logging.info('Finding release from maven central')
+  try:
+    response = request_session_with_retries().get(url)
+    if not response.ok:
+      logging.error("The response status code is not ok: " + 
str(response.status_code))
+      logging.info("Failed finding the release date of {0}:{1} 
{2}".format(group_id, artifact_id, version))
+      return None
+    response_data = response.json()
+    release_timestamp = response_data['response']['docs'][0]['timestamp']
 
 Review comment:
   Done.

----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 134745)
    Time Spent: 3h 20m  (was: 3h 10m)

> Using the restful API in Beam dependency check system, get rid of bigquery
> --------------------------------------------------------------------------
>
>                 Key: BEAM-5071
>                 URL: https://issues.apache.org/jira/browse/BEAM-5071
>             Project: Beam
>          Issue Type: Bug
>          Components: dependencies
>            Reporter: yifan zou
>            Assignee: yifan zou
>            Priority: Major
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to