Open jonathanmetzman opened 1 month ago
@vitorguidi can you please take a look at this?
TODO: Removing the folder and entries and replacing when needed with google_issue_tracker
as monorail is deprecated
README.md
60:[Monorail]: https://opensource.google.com/projects/monorail
configs/test/issue_trackers/config.yaml
23: type: monorail
configs/test/project.yaml
102: # Default issue tracker name unless overridden in a job definition. Current only supports monorail
docs/clusterfuzz/architecture.md
36:[Monorail](https://opensource.google.com/projects/monorail). Support for custom
docs/index.md
38:[Monorail]: https://opensource.google.com/projects/monorail
48:[Monorail]: https://opensource.google.com/projects/monorail
src/clusterfuzz/_internal/datastore/data_types.py
1495: # The monorail issue ID for the failure.
src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py
1005: """The type of the tracker - e.g. monorail, google-issue-tracker, etc."""
src/clusterfuzz/_internal/issue_management/issue_tracker_utils.py
23:from clusterfuzz._internal.issue_management import monorail
28: 'monorail': monorail.get_issue_tracker,
src/clusterfuzz/_internal/issue_management/monorail/__init__.py
19:from clusterfuzz._internal.issue_management.monorail.issue import \
21:from clusterfuzz._internal.issue_management.monorail.issue import ChangeList
23:from clusterfuzz._internal.issue_management.monorail.issue_tracker_manager import \
35: def __init__(self, monorail_issue):
36: self._monorail_issue = monorail_issue
42: self._ccs = issue_tracker.LabelStore(self._monorail_issue.cc)
43: self._components = issue_tracker.LabelStore(self._monorail_issue.components)
44: self._labels = issue_tracker.LabelStore(self._monorail_issue.labels)
49: return IssueTracker(self._monorail_issue.itm)
54: return self._monorail_issue.id
59: return self._monorail_issue.summary
63: self._monorail_issue.summary = new_title
68: return self._monorail_issue.reporter
72: self._monorail_issue.reporter = new_reporter
77: if self._monorail_issue.merged_into_project != self.issue_tracker.project:
81: return self._monorail_issue.merged_into
86: return self._monorail_issue.open
90: return self._monorail_issue.closed
95: return self._monorail_issue.status
99: self._monorail_issue.status = new_status
104: return self._monorail_issue.body
108: self._monorail_issue.body = new_body
113: return self._monorail_issue.owner
117: self._monorail_issue.owner = new_assignee
137: return (Action(comment) for comment in self._monorail_issue.get_comments())
144: self._monorail_issue.add_component(added)
146: self._monorail_issue.remove_component(removed)
150: self._monorail_issue.add_cc(added)
152: self._monorail_issue.remove_cc(removed)
156: self._monorail_issue.add_label(added)
158: self._monorail_issue.remove_label(removed)
162: self._monorail_issue.comment = new_comment
164: self._monorail_issue.save(send_email=notify)
170: def __init__(self, monorail_comment):
171: self._monorail_comment = monorail_comment
176: return self._monorail_comment.author
181: return self._monorail_comment.comment
186: return self._monorail_comment.summary
191: return self._monorail_comment.status
196: return self._monorail_comment.owner
201: return _to_change_list(self._monorail_comment.cc)
206: return _to_change_list(self._monorail_comment.labels)
211: return _to_change_list(self._monorail_comment.components)
225: monorail_issue = MonorailIssue()
226: monorail_issue.itm = self._itm
227: return Issue(monorail_issue)
230: monorail_issue = self._itm.get_issue(int(issue_id))
231: if not monorail_issue:
234: return Issue(monorail_issue)
274:def _to_change_list(monorail_list):
277: if not monorail_list:
280: for item in monorail_list:
290: """Return monorail issue tracker manager for the given project."""
src/clusterfuzz/_internal/issue_management/monorail/issue_tracker_manager.py
124: API_DISCOVERY_URL = ('https://monorail-prod.appspot.com/_ah/api/discovery/'
126: API_NAME = 'monorail'
src/clusterfuzz/_internal/tests/appengine/handlers/cron/cleanup_test.py
190: self.assertEqual('', self.issue._monorail_issue.comment)
203: self.assertEqual('', self.issue._monorail_issue.comment)
218: self.issue._monorail_issue.comment)
242: self.issue._monorail_issue.comment)
262: self.assertEqual('', self.issue._monorail_issue.comment)
286: self.issue._monorail_issue.comment)
303: self.issue._monorail_issue.open = False
313: self.issue._monorail_issue.comment)
326: self.issue._monorail_issue.comments += [
333: self.assertEqual('', self.issue._monorail_issue.comment)
346: self.issue._monorail_issue.comments += [
353: self.assertEqual('', self.issue._monorail_issue.comment)
367: self.assertEqual('', self.issue._monorail_issue.comment)
390: self.issue._monorail_issue.comment)
425: self.issue._monorail_issue.open = True
435: self.issue._monorail_issue.open = False
436: self.issue._monorail_issue.closed = (
439: self.issue._monorail_issue.comments += [
453: self.issue._monorail_issue.open = False
454: self.issue._monorail_issue.closed = (
467: self.issue._monorail_issue.open = False
468: self.issue._monorail_issue.closed = (
518: self.issue._monorail_issue.open = False
530: self.issue._monorail_issue.open = True
542: self.issue._monorail_issue.open = False
579: self.issue._monorail_issue.open = False
627: self.issue._monorail_issue.comments += [
756: self.issue._monorail_issue.open = False
757: self.issue._monorail_issue.closed = (
787: self.issue._monorail_issue.open = True
798: self.issue._monorail_issue.open = False
799: self.issue._monorail_issue.closed = (
812: self.issue._monorail_issue.open = False
813: self.issue._monorail_issue.closed = (
816: self.issue._monorail_issue.comments += [
830: self.issue._monorail_issue.open = False
831: self.issue._monorail_issue.closed = (
834: self.issue._monorail_issue.comments += [
848: self.issue._monorail_issue.open = False
849: self.issue._monorail_issue.closed = (
870: self.issue._monorail_issue.comment)
924: self.issue._monorail_issue.comments += [
993: issue._monorail_issue.labels = []
1037: issue._monorail_issue.labels = []
1040: issue._monorail_issue.comments.append(comment)
1196: self.assertEqual('', self.issue._monorail_issue.comment)
1216: self.assertEqual('', self.issue._monorail_issue.comment)
1239: self.assertEqual('', self.issue._monorail_issue.comment)
1268: self.issue._monorail_issue.comment)
1297: self.issue._monorail_issue.comment)
1336: self.issue._monorail_issue.comment)
1351: self.issue._monorail_issue.comments += [
1361: self.assertEqual('', self.issue._monorail_issue.comment)
1415: self.issue._monorail_issue.comments.append(comment)
1513: self.issue._monorail_issue.cc = []
1524: self.issue._monorail_issue.open = False
1527: self.assertEqual('', self.issue._monorail_issue.comment)
1535: self.assertEqual('', self.issue._monorail_issue.comment)
1536: self.issue._monorail_issue.comments.append(comment)
1547: self.assertEqual('', self.issue._monorail_issue.comment)
1557: self.assertEqual('', self.issue._monorail_issue.comment)
1567: self.assertEqual('', self.issue._monorail_issue.comment)
1579: self.assertEqual('', self.issue._monorail_issue.comment)
1586: self.issue._monorail_issue.cc = ['dev1@example1.com']
1592: self.issue._monorail_issue.comment)
1606: self.issue._monorail_issue.comment)
1633: 'updating reproducibility label.', self.issue._monorail_issue.comment)
1646: self.assertEqual('', self.issue._monorail_issue.comment)
1658: self.assertEqual('', self.issue._monorail_issue.comment)
1675: self.assertEqual('', self.issue._monorail_issue.comment)
1724: self.issue._monorail_issue.open = False
1747: self.issue._monorail_issue.comments.append(comment)
1759: self.issue._monorail_issue.comments.append(comment)
1841: self.issue._monorail_issue.comments.append(comment)
1907: self.issue._monorail_issue.open = False
1910: self.assertEqual(self.issue._monorail_issue.comment, '')
1916: self.assertEqual(self.issue._monorail_issue.comment, '')
1924: self.issue._monorail_issue.comment)
1931: self.issue._monorail_issue.comments += [
1938: self.issue._monorail_issue.comment)
src/clusterfuzz/_internal/tests/appengine/handlers/cron/oss_fuzz_apply_ccs_test.py
21:from clusterfuzz._internal.issue_management import monorail
22:from clusterfuzz._internal.issue_management.monorail.issue import Issue
83: return monorail.Issue(issue)
117: monorail.IssueTracker(self.itm))
src/clusterfuzz/_internal/tests/appengine/handlers/cron/oss_fuzz_build_status_test.py
23:from clusterfuzz._internal.issue_management import monorail
24:from clusterfuzz._internal.issue_management.monorail.issue import Issue
79: self.mock.get_issue_tracker.return_value = monorail.IssueTracker(self.itm)
src/clusterfuzz/_internal/tests/appengine/handlers/cron/triage_test.py
254: self.assertEqual('', self.issue._monorail_issue.comment)
288: self.assertEqual('', self.issue._monorail_issue.comment)
310: self.issue._monorail_issue.open = False
334: self.issue._monorail_issue.open = False
335: self.issue._monorail_issue.closed = (
src/clusterfuzz/_internal/tests/appengine/handlers/testcase_detail/find_similar_issues_test.py
22:from clusterfuzz._internal.issue_management import monorail
23:from clusterfuzz._internal.issue_management.monorail import issue
71: monorail_issue = issue.Issue()
72: monorail_issue.id = 100
73: issue_item = monorail.Issue(monorail_issue)
src/clusterfuzz/_internal/tests/appengine/handlers/testcase_detail/update_issue_test.py
23:from clusterfuzz._internal.issue_management import monorail
24:from clusterfuzz._internal.issue_management.monorail import \
26:from clusterfuzz._internal.issue_management.monorail import issue
100: monorail.IssueTracker(itm))
123: monorail.IssueTracker(itm))
147: monorail.IssueTracker(itm))
src/clusterfuzz/_internal/tests/appengine/libs/access_test.py
20:from clusterfuzz._internal.issue_management import monorail
21:from clusterfuzz._internal.issue_management.monorail import \
23:from clusterfuzz._internal.issue_management.monorail import issue
253: 'clusterfuzz._internal.issue_management.monorail.issue_tracker_manager.'
259: monorail.IssueTracker(self.itm))
368: self.mock.get_original_issue.return_value = monorail.Issue(
src/clusterfuzz/_internal/tests/appengine/libs/issue_filer_test.py
31:from clusterfuzz._internal.issue_management import monorail
35:from clusterfuzz._internal.issue_management.monorail.issue import \
525: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
536: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
545: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
558: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
575: issue_tracker = monorail.IssueTracker(IssueTrackerManager('oss-fuzz'))
643: issue_tracker = monorail.IssueTracker(IssueTrackerManager('oss-fuzz'))
658: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
677: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
686: original_save = monorail.issue.Issue.save
689: ['clusterfuzz._internal.issue_management.monorail.issue.Issue.save'])
699: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
713: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
727: issue_tracker = monorail.IssueTracker(IssueTrackerManager(project_name))
745: issue_tracker = monorail.IssueTracker(IssueTrackerManager(project_name))
768: issue_tracker = monorail.IssueTracker(IssueTrackerManager(project_name))
803: issue_tracker = monorail.IssueTracker(IssueTrackerManager(project_name))
825: issue_tracker = monorail.IssueTracker(IssueTrackerManager(project_name))
836: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
853: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
889: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
930: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
961: issue_tracker = monorail.IssueTracker(IssueTrackerManager('chromium'))
src/clusterfuzz/_internal/tests/appengine/libs/issue_management/issue_tracker_utils_test.py
22:from clusterfuzz._internal.issue_management import monorail
68: def test_get_issue_tracker_monorail(self):
70: """Test for get monorail issue tracker."""
73: 'clusterfuzz._internal.issue_management.monorail._get_issue_tracker_manager_for_project'
75: self.mock.get.return_value = {'type': 'monorail'}
78: 'monorail': monorail.get_issue_tracker
89: 'clusterfuzz._internal.issue_management.monorail._get_issue_tracker_manager_for_project'
src/clusterfuzz/_internal/tests/appengine/libs/issue_management/monorail/monorail_test.py
14:"""Tests for monorail issue management."""
20:from clusterfuzz._internal.issue_management import monorail
21:from clusterfuzz._internal.issue_management.monorail import \
23:from clusterfuzz._internal.issue_management.monorail.comment import \
25:from clusterfuzz._internal.issue_management.monorail.issue import \
52: """Tests for the monorail issue tracker."""
56: 'clusterfuzz._internal.issue_management.monorail.issue_tracker_manager.'
110: self.issue_tracker = monorail.IssueTracker(self.itm)
157: monorail_issue = self.itm.last_issue
159: self.assertEqual('summary', monorail_issue.summary)
160: self.assertEqual('body', monorail_issue.body)
161: self.assertEqual('owner', monorail_issue.owner)
162: self.assertEqual('reporter', monorail_issue.reporter)
163: self.assertEqual('New', monorail_issue.status)
164: self.assertEqual('comment', monorail_issue.comment)
169: ], monorail_issue.labels)
173: ], monorail_issue.components)
176: ], monorail_issue.cc)
src/clusterfuzz/_internal/tests/test_libs/appengine_test_utils.py
18:from clusterfuzz._internal.issue_management import monorail
19:from clusterfuzz._internal.issue_management.monorail.comment import Comment
20:from clusterfuzz._internal.issue_management.monorail.issue import Issue
42: return monorail.Issue(issue)
src/local/butler/scripts/github_metadata_backfiller.py
99: monorail_issue = issue_tracker.get_original_issue(bug_information)
100: if monorail_issue.is_open:
src/local/butler/scripts/migration/monorail_to_issuetracker_migrator.py
20: migration.monorail_to_issuetracker_migrator
23:"monorail_id,buganizer_id" in each line.
57: issue_id_dict = get_monorail_issuetracker_issue_id_dictionary(
122:def get_monorail_issuetracker_issue_id_dictionary(file_loc, roll_back):
123: """Creates a mapping of monorail/issuetracker issue ids."""
127: # a monorail issue id, and a issuetracker issue id
131: for monorail_id, issuetracker_id in reader:
133: issue_id_dictionary[issuetracker_id] = monorail_id
135: issue_id_dictionary[monorail_id] = issuetracker_id
It's no longer used.