Skip to content

Add annual reports for accounts #28693

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

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Add annual reports for accounts #28693

merged 1 commit into from
Jan 24, 2024

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Jan 11, 2024

Fixes MAS-213

@Gargron Gargron added the api REST API, Streaming API, Web Push API label Jan 11, 2024
@Gargron Gargron force-pushed the feature-annual-reports branch 2 times, most recently from 7ceca30 to de8c7f5 Compare January 11, 2024 06:01
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 75 lines in your changes are missing coverage. Please review.

Comparison is base (61a0ec6) 85.08% compared to head (162e695) 84.91%.

Files Patch % Lines
app/lib/annual_report/archetype.rb 38.46% 16 Missing ⚠️
app/lib/annual_report/percentiles.rb 50.00% 9 Missing ⚠️
...pp/controllers/api/v1/annual_reports_controller.rb 56.25% 7 Missing ⚠️
app/lib/annual_report.rb 57.14% 6 Missing ⚠️
app/lib/annual_report/time_series.rb 54.54% 5 Missing ⚠️
app/lib/annual_report/top_statuses.rb 37.50% 5 Missing ⚠️
app/models/generated_annual_report.rb 63.63% 4 Missing ⚠️
app/presenters/annual_reports_presenter.rb 63.63% 4 Missing ⚠️
...annual_report/commonly_interacted_with_accounts.rb 62.50% 3 Missing ⚠️
app/lib/annual_report/most_reblogged_accounts.rb 62.50% 3 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #28693      +/-   ##
==========================================
- Coverage   85.08%   84.91%   -0.18%     
==========================================
  Files        1038     1055      +17     
  Lines       28159    28332     +173     
  Branches     4533     4545      +12     
==========================================
+ Hits        23959    24057      +98     
- Misses       3039     3114      +75     
  Partials     1161     1161              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ember-ruby
Copy link

Fixes MAS-213

unless I'm missing something, this doesn't seem to be mentioned anywhere on the roadmap or any currently open issue?

@renchap
Copy link
Member

renchap commented Jan 11, 2024

We have an internal bug tracker for project-wide features, and this is what MAS-213 references. The public roadmap is generated from it, but has not been updated in a while (I need to look at how to automate it).

@Gargron Gargron force-pushed the feature-annual-reports branch from de8c7f5 to 5d75965 Compare January 11, 2024 19:16
@Gargron Gargron marked this pull request as ready for review January 11, 2024 19:17
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made a few inline comments. In addition, I am concerned about two things:

  • I'm concerned with the server load of going through each account's year of posts, this may expensive if your instance has prolific posters
  • I'm concerned with the fact this stores user metadata of a somewhat personal nature (such as most used app, most reblogged accounts, interacted with accounts, …) that the user may not know about (because of not using a client that makes use of this API) or may not delete (the current implementation does not provide any way to remove them from the database) save for outright deleting their account

@Gargron Gargron added the build-image Build a container image for this PR label Jan 12, 2024
@Gargron Gargron force-pushed the feature-annual-reports branch 3 times, most recently from c2251a2 to c0a4a66 Compare January 13, 2024 04:31
ClearlyClaire
ClearlyClaire previously approved these changes Jan 22, 2024
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not a fan of the popularity-based information, and I still have concerns regarding the performance cost of generating a large number of these reports, and regarding the fact this essentially holds (small amounts of) user metadata the user can't remove unless they outright delete their account.

However, since these reports are currently not automatically created and can only be manually created through a Rails console, these concerns are not blocker for now, but they probably need to be addressed before those reports get generalized.

@Gargron
Copy link
Member Author

Gargron commented Jan 24, 2024

Last change adds a percentile calculation based on posts created as per Sam's comment.

@Gargron Gargron requested a review from ClearlyClaire January 24, 2024 04:52
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeating my previous review as it is still relevant:

I'm still not a fan of the popularity-based information, and I still have concerns regarding the performance cost of generating a large number of these reports, and regarding the fact this essentially holds (small amounts of) user metadata the user can't remove unless they outright delete their account.

However, since these reports are currently not automatically created and can only be manually created through a Rails console, these concerns are not blocker for now, but they probably need to be addressed before those reports get generalized.

@Gargron Gargron added this pull request to the merge queue Jan 24, 2024
Merged via the queue into main with commit 5b1eb09 Jan 24, 2024
@Gargron Gargron deleted the feature-annual-reports branch January 24, 2024 09:43
@ShadowJonathan
Copy link
Contributor

There's absolutely no information as to what this feature is about, and we have no idea what we're merging into our forks at the moment; is this some sort of "mastodon wrapped" feature? And if so, could it be turned off? There is absolutely no reason for this to become a staple feature for a server, it only adds to the cruft and maintenance.

@renchap
Copy link
Member

renchap commented Jan 28, 2024

This is an experimental feature, to power an eventual yearly recap feature.

This code can not be triggered in any way at the moment, except through the console, and will be built upon later. Nothing is defined yet, but I can see the need for a server setting to disable it.

@mdingemanse
Copy link

Marking my surprise that the comments by @ClearlyClaire are not even acknowledged. This is not only an additional server burden, it is also personal and potentially GDPR-relevant info that users will not be aware is being collected and that they should have power to delete or opt out of.

@renchap
Copy link
Member

renchap commented Feb 5, 2024

As I said above, this is an experimental feature that can not be triggered except through the console. The comments above have not been ignored, but work on the feature has stopped for now. It will evolve in a future PR (or removed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API build-image Build a container image for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants