Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't spam emails during test case run status updates #367

Closed
okainov opened this Issue Jun 13, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@okainov
Copy link
Contributor

okainov commented Jun 13, 2018

tcms/testruns/models.py

def update_completion_status(self, is_auto_updated, is_finish=None):

Looks like self.save is being called almost always and it causes tons of spam emails during test run execution. Please don't spam on useless events.

atodorov added a commit that referenced this issue Jul 20, 2018

Update TestRun complation status manually. Fix #367
TestRun.update_completion_status() is now called in only 2 places
after a user selected action. We've removed the functionality to
update the status automatically and removed all signals related
to that.

This will also fix #367 because emails are sent after TestRun.save()
which now is less often (e.g. when user edits or changes status).
@okainov

This comment has been minimized.

Copy link
Contributor Author

okainov commented Jul 20, 2018

@atodorov why? This feature was pretty useful and I would even say that is should be enabled by default. Because you will always forget to click "set as finished", and automatic update was nice.

My issue here was only in calling "save" all the time, not with the feature itself.

@atodorov

This comment has been minimized.

Copy link
Member

atodorov commented Jul 20, 2018

@okainov - the answer of "why remove it" is that this feature as it was implemented was more trouble than it's worth it. I personally think this should be done automatically without asking when the last test case has been executed (this is missing, feel free to request it and let's count the +1s).

OTOH I like to keep runs unfinished so they are available on my dashboard until I don't need them anymore.

Edit: signals in Django (which are triggered post_save and send the emails) have no idea about what triggered them. So we'd have to implement some logic that teaches the code to ignore signals if the status was updated automatically. Not a good proposal either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.