-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Activities dissappear from UI when internal processes are run by ignored users #5698
Comments
amercader
added a commit
that referenced
this issue
Oct 28, 2020
Fixes #5698 The `ckan.hide-activity-from-users` configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations. The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option. This means that if more activities from the site user were performed than the limit requested, they are fltered out and you get an empty feed, eventhough the activities are still there. These moves the filtering to the model queries.
amercader
added a commit
that referenced
this issue
Oct 28, 2020
amercader
added a commit
that referenced
this issue
Oct 28, 2020
amercader
added a commit
that referenced
this issue
Oct 28, 2020
smotornyuk
added a commit
that referenced
this issue
Nov 6, 2020
[#5698] Filter activities from user at the database level
amercader
added a commit
that referenced
this issue
Jan 15, 2021
Fixes #5698 The `ckan.hide-activity-from-users` configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations. The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option. This means that if more activities from the site user were performed than the limit requested, they are fltered out and you get an empty feed, eventhough the activities are still there. These moves the filtering to the model queries.
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
Fixes #5698 The `ckan.hide-activity-from-users` configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations. The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option. This means that if more activities from the site user were performed than the limit requested, they are fltered out and you get an empty feed, eventhough the activities are still there. These moves the filtering to the model queries.
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
Fixes #5698 The `ckan.hide-activity-from-users` configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations. The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option. This means that if more activities from the site user were performed than the limit requested, they are fltered out and you get an empty feed, eventhough the activities are still there. These moves the filtering to the model queries.
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
amercader
added a commit
that referenced
this issue
Jan 15, 2021
fostermh
pushed a commit
to cioos-siooc/ckan
that referenced
this issue
Sep 10, 2021
jguo144
pushed a commit
to OpenGov-OpenData/ckan
that referenced
this issue
Oct 5, 2021
Fixes ckan#5698 The `ckan.hide-activity-from-users` configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations. The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option. This means that if more activities from the site user were performed than the limit requested, they are fltered out and you get an empty feed, eventhough the activities are still there. These moves the filtering to the model queries.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CKAN version
2.0 onwards
Describe the bug
Activities shown on the organization or dashboard activity feed can suddenly disappear and show an empty list, eg:
to
Apparently the user didn't change anything on the frontend, and if you check the database, the activities are there.
The problem is how we handle the
ckan.hide-activity-from-users
configuration option. This allows you to define the users that you don't want to show activities from. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations.The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option:
ckan/ckan/logic/action/get.py
Lines 2665 to 2671 in ccc582d
The default limit is 31 so if we had 6 initial activities that were visible and at some point the site user goes and eg imports 50 datasets, we will get the most recent 31 activities by the site user from the database, and filter them all out so the none will be shown in the UI.
I could not find any reason for this filter to not be applied at the database query level, which is going to be more performant anyway.
Steps to reproduce
Steps to reproduce the behavior:
ckan.hide-activity-from-users
)Expected behavior
Activities should not disappear
The text was updated successfully, but these errors were encountered: