-
Notifications
You must be signed in to change notification settings - Fork 144
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
ActivityStream is swamped by tiles during resource creation #9768
Comments
Propose that resource.save() should send a flag to the tile.save() function to prevent the creation of the edit_log entry for each tile. Tile edits don't go through resource.save(), so the updates still end up in the history. Any downsides to this? |
Maybe the activity stream could filter out the tile create entries? |
Hi @apeters! I tried that initially, but it's hard to determine which tile edits are part of the creation, and which are legitimate changes. Even after fixing #9769, you can't just remove all tile changes that immediately follow the resource's Create event, as there could be real edits to the resource with no intervening changes to other resources. And if the change post-create was to create a new tile (rather than to update the data in an existing one) it couldn't rely on the distinction between create and update. Perhaps it could trigger off of Is there a reason for the tile creates in the log though? Is there any harm in filtering them out? Perhaps with a flag in settings to enable it? |
Those entries are used for transaction reversals in workflows and bulk loader modules: arches/arches/app/utils/transaction.py Line 21 in 03b0b1d
Currently the bulk loader only creates tiles following the creation of resource, but we are working on allowing tiles to be appended to existing resources. We could add a setting to skip the creation of some edit records, but it would be important to hide any features that use transaction reversal whenever that flag is set to 'true'. |
Got it, thanks Cyrus! For our current usage, I don't need bulk loading or backing out transactions so I don't think we're blocked in our current hacky workaround, but it would be good to discuss the right solution that allows both to co-exist. Per Alexei's response, having a filter that could distinguish internal tile creation within the resource creation would be great... arches/arches/app/views/resource.py Line 669 in 03b0b1d
But I don't know how to do that :) |
@azaroth42 Just to be clear it sounds like it's not simply tile create events that are the issue (because those could easily be filtered with |
Right! If this line passed /something/ that could then be filtered on when constructing the list: https://github.com/archesproject/arches/blob/master/arches/app/models/resource.py#L228 but rolled together for the transaction / bulk edit usage. "import tile create" or somesuch? |
The 'note' column is unused. We could document the context of the tile creation there. |
When creating a resource, every tile that gets created during the process spawns an entry in the activity stream at /history. With only 19 instances, my stream is already at 1200 entries, making it very expensive to consume.
Instead, there should be a Create entry that subsumes all of the subsequent tile edit Update entries.
The text was updated successfully, but these errors were encountered: