Remove source_event from Change objects
In the past source_event has been used to improve merge messages. This is being attached to changes in getChange. Since there can be any event on a change this has been wrong and is now unused. Thus remove this variable. Further it currently even creates a problematic memleak when doing dequeue commands without the change being in any queue. In this case the exception trace including all local variables of the frames (e.g. Tenant) are attached to the event and thus to the cached change which will never be cleared unless there is another event incoming for this change). Change-Id: I23e59e66f485bf46493d7a5bdf7bc29966e56993
This commit is contained in:
parent
2dc98bea8d
commit
878946cbba
|
@ -1258,7 +1258,6 @@ class GithubConnection(BaseConnection):
|
|||
change = self._getChange(project, event.change_number,
|
||||
event.patch_number, refresh=refresh,
|
||||
event=event)
|
||||
change.source_event = event
|
||||
change.is_current_patchset = (change.pr.get('head').get('sha') ==
|
||||
event.patch_number)
|
||||
else:
|
||||
|
@ -1278,7 +1277,6 @@ class GithubConnection(BaseConnection):
|
|||
# In case we have a tag, we build the url pointing to this
|
||||
# tag/release on GitHub.
|
||||
change.url = self.getGitwebUrl(project, sha=event.newrev, tag=tag)
|
||||
change.source_event = event
|
||||
if hasattr(event, 'commits'):
|
||||
change.files = self.getPushedFileNames(event)
|
||||
return change
|
||||
|
|
|
@ -461,7 +461,6 @@ class GitlabConnection(BaseConnection):
|
|||
change = self._getChange(
|
||||
project, event.change_number, event.patch_number,
|
||||
refresh=refresh, event=event)
|
||||
change.source_event = event
|
||||
change.is_current_patchset = (change.patchset ==
|
||||
event.patch_number)
|
||||
else:
|
||||
|
@ -483,8 +482,6 @@ class GitlabConnection(BaseConnection):
|
|||
change.url = self.getGitwebUrl(project, sha=event.newrev)
|
||||
|
||||
change.files = None
|
||||
|
||||
change.source_event = event
|
||||
return change
|
||||
|
||||
def _getChange(self, project, number, patch_number=None,
|
||||
|
|
|
@ -658,7 +658,6 @@ class PagureConnection(BaseConnection):
|
|||
change = self._getChange(
|
||||
project, event.change_number, event.patch_number,
|
||||
refresh=refresh, event=event)
|
||||
change.source_event = event
|
||||
change.is_current_patchset = (change.pr.get('commit_stop') ==
|
||||
event.patch_number)
|
||||
else:
|
||||
|
@ -684,8 +683,6 @@ class PagureConnection(BaseConnection):
|
|||
# call the merger asynchronuously
|
||||
change.files = None
|
||||
|
||||
change.source_event = event
|
||||
|
||||
return change
|
||||
|
||||
def _getChange(self, project, number, patchset=None,
|
||||
|
|
|
@ -3211,8 +3211,6 @@ class Change(Branch):
|
|||
# look for depends-on headers.
|
||||
self.message = None
|
||||
|
||||
self.source_event = None
|
||||
|
||||
def _id(self):
|
||||
return '%s,%s' % (self.number, self.patchset)
|
||||
|
||||
|
|
Loading…
Reference in New Issue