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
DataPrivacy Task fails in some situations #3402
Comments
As in user's own activity stream or referenced in other user's activity stream? |
I can't answer that question. |
Next time this errors occur we could check what column is the relation to the error via psql console We also could add a dumper to the app/models/concerns/has_activity_stream_log.rb to see if we mistakenly create new entries for the activity stream log while we deleting the user. |
So this affects an instance again. The affected user is an agent.
So I then checked the references - here's a complete dump:
So to continue I wanted to update However, I couldn't find any ActivitySteams by affected user IDs.
So what I did then was, I dropped all 437,783 ActivityStreams. If you provide debugging code I'll implement it the next time this happens. If I run |
checkout this place: zammad/app/models/activity_stream.rb Line 32 in c3b1b44
put the following the beginning of the function: Rails.logger.error "ActivityStream.add - #{data.inspect}" Maybe it will run when you are trying to destroy the user. |
It would be also interesting if this change fixes the problem: Line 1172 in c3b1b44
Replace: user_columns = %w[created_by_id updated_by_id origin_by_id owner_id archived_by_id published_by_id internal_by_id] with user_columns = %w[updated_by_id created_by_id origin_by_id owner_id archived_by_id published_by_id internal_by_id] |
See my comment above, this fails as well. So initially I only updated
I then moved over to adjusting Changing the order does not fix the issue, basically the log out put from above looks kinda the same tbh. |
oh nice debug infos!! Nice thank you very much... i think i know now where the problem is let me take a look... |
Infos:
Expected behavior:
DataPrivacy will adjust or remove all references of to be deleted users if needed.
Actual behavior:
When deleting a agent, it sometimes happens that those tasks fail because of the the user still being referenced within ActivityStreams.
After clearing those issues, you usually can reprocess the DataPrivacy Task without issues.
Example:
Steps to reproduce the behavior:
Yes I'm sure this is a bug and no feature request or a general question.
The text was updated successfully, but these errors were encountered: