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

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

                Author: ASF GitHub Bot
            Created on: 24/Sep/18 04:28
            Start Date: 24/Sep/18 04:28
    Worklog Time Spent: 10m 
      Work Description: chamikaramj commented on a change in pull request 
#6430: [BEAM-5339]/apply new policy on Beam dependency tooling
URL: https://github.com/apache/beam/pull/6430#discussion_r219727922
 
 

 ##########
 File path: .test-infra/jenkins/jira_utils/jira_manager.py
 ##########
 @@ -199,20 +209,61 @@ def _find_owners(self, dep_name):
       owners = dep_info['owners']
       if not owners:
         logging.warning("Could not find owners for " + dep_name)
-        return None, []
+        return []
     except KeyError:
       traceback.print_exc()
       logging.warning("Could not find the dependency info of {0} in the OWNERS 
configurations.".format(dep_name))
-      return None, []
+      return []
     except Exception as e:
       traceback.print_exc()
       logging.error("Failed finding dependency owners: "+ str(e))
-      return None, None
+      return None
 
     logging.info("Found owners of {0}: {1}".format(dep_name, owners))
     owners = owners.split(',')
     owners = map(str.strip, owners)
     owners = list(filter(None, owners))
-    primary = owners[0]
-    del owners[0]
-    return primary, owners
+    return owners
+
+
+  def _need_reopen(self, issue, dep_latest_version):
+    """
+    Return a boolean that indicates whether reopen the closed issue.
+    """
+    # Check if the issue was closed with a "fix version/s"
+    # Reopen the issue if it hits the next release version.
+    next_release_version = self._get_next_release_version()
+    if issue.fields.fixVersions[0].name in next_release_version:
+      return True
+
+    # Check if there is other new versions released.
+    # Reopen the issue if 3 new version has been released in 6 month since 
closure.
+    try:
+      if issue.fields.resolutiondate:
+        closing_date = datetime.strptime(issue.fields.resolutiondate[:19], 
"%Y-%m-%dT%H:%M:%S")
+        if (datetime.today() - closing_date).days >= _ISSUE_REOPEN_DAYS:
+          # Extract the previous version when JIRA closed.
+          descriptions = issue.fields.description.splitlines()
+          descriptions = descriptions[len(descriptions)-3]
+          previous_version = descriptions.split("the latest version", 
1)[1].strip()
+          if version_comparer.compare_dependency_versions(previous_version, 
dep_latest_version):
+            return True
+    except Exception as e:
+      traceback.print_exc()
+      logging.error("Failed deciding to reopen the issue." + str(e))
+      return False
+
+    return False
+
+
+  def _get_next_release_version(self):
+    global_names = {}
+    exec(
+      open(os.path.join(
+          os.path.dirname(os.path.abspath(__file__)),
+          '../../../sdks/python/',
+          'apache_beam/version.py')
+      ).read(),
+      global_names
+    )
+    return global_names['__version__']
 
 Review comment:
   Missing new line.

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 146938)
    Time Spent: 2h  (was: 1h 50m)

> Implement new policy on Beam dependency tooling
> -----------------------------------------------
>
>                 Key: BEAM-5339
>                 URL: https://issues.apache.org/jira/browse/BEAM-5339
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: yifan zou
>            Assignee: yifan zou
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> (1) Instead of a dependency "owners" list we will be maintaining an 
> "interested parties" list. When we create a JIRA for a dependency we will not 
> assign it to an owner but rather we will CC all the folks that mentioned that 
> they will be interested in receiving updates related to that dependency. Hope 
> is that some of the interested parties will also put forward the effort to 
> upgrade dependencies they are interested in but the responsibility of 
> upgrading dependencies lie with the community as a whole.
>  (2) We will be creating JIRAs for upgrading individual dependencies, not for 
> upgrading to specific versions of those dependencies. For example, if a given 
> dependency X is three minor versions or an year behind we will create a JIRA 
> for upgrading that. But the specific version to upgrade to has to be 
> determined by the Beam community. Beam community might choose to close a JIRA 
> if there are known issues with available recent releases. Tool may reopen 
> such a closed JIRA in the future if new information becomes available (for 
> example, 3 new versions have been released since JIRA was closed)



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

Reply via email to