You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2022/07/12 03:11:12 UTC

[lucene-jira-archive] 01/01: catch all exceptions (and proceed to the nexe issue)

This is an automated email from the ASF dual-hosted git repository.

tomoko pushed a commit to branch catch-all-exception-when-converting
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git

commit ed433056edfc00cd2a5a6a1d57bea77bdaf226d1
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Tue Jul 12 12:11:02 2022 +0900

    catch all exceptions (and proceed to the nexe issue)
---
 migration/src/jira2github_import.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/migration/src/jira2github_import.py b/migration/src/jira2github_import.py
index 9eebcd27..18e407b1 100644
--- a/migration/src/jira2github_import.py
+++ b/migration/src/jira2github_import.py
@@ -11,6 +11,7 @@ import json
 import sys
 from urllib.parse import quote
 import os
+import traceback
 
 from common import LOG_DIRNAME, JIRA_DUMP_DIRNAME, GITHUB_IMPORT_DATA_DIRNAME, MAPPINGS_DATA_DIRNAME, ACCOUNT_MAPPING_FILENAME, ISSUE_TYPE_TO_LABEL_MAP, COMPONENT_TO_LABEL_MAP, \
     logging_setup, jira_issue_url, jira_dump_file, jira_issue_id, github_data_file, make_github_title, read_account_map
@@ -211,7 +212,11 @@ if __name__ == "__main__":
 
     logger.info(f"Converting Jira issues to GitHub issues in {output_dir}")
     for num in issues:
-        convert_issue(num, dump_dir, output_dir, account_map, github_att_repo, github_att_branch)
+        try:
+            convert_issue(num, dump_dir, output_dir, account_map, github_att_repo, github_att_branch)
+        except Exception as e:
+            logger.error(traceback.format_exc(limit=100))
+            logger.error(f"Failed to convert Jira issue. An error '{str(e)}' occurred; skipped {jira_issue_id(num)}.")
     
     logger.info("Done.")