Skip to content

feat(review): Add atom feed for review team actions.#9846

Open
kivinen wants to merge 1 commit intoietf-tools:mainfrom
kivinen:fix-8652
Open

feat(review): Add atom feed for review team actions.#9846
kivinen wants to merge 1 commit intoietf-tools:mainfrom
kivinen:fix-8652

Conversation

@kivinen
Copy link
Contributor

@kivinen kivinen commented Nov 1, 2025

Add atom feed for review team actions. The url is /feed/review-requests//, and it can have two parameters, since and reviewer_email that can limit the feed to specific reviewer (?reviewer_email) and for last n days (?since=). (Fixes #8652)

@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

❌ Patch coverage is 96.22642% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.55%. Comparing base (cbb0e2e) to head (eb3866f).
⚠️ Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
ietf/group/feeds.py 96.15% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9846   +/-   ##
=======================================
  Coverage   88.54%   88.55%           
=======================================
  Files         316      316           
  Lines       42265    42317   +52     
=======================================
+ Hits        37423    37472   +49     
- Misses       4842     4845    +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rjsparks
Copy link
Member

rjsparks commented Nov 3, 2025

I wonder if the parameterization part of this can be processed at the edge, letting us leave a relatively static computation of the feed (updated only when there are directorate action changes) at the edge?

@kivinen
Copy link
Contributor Author

kivinen commented Nov 3, 2025 via email

@kivinen
Copy link
Contributor Author

kivinen commented Nov 3, 2025

And to change the default date limit just changing the line

    since = params.cleaned_data["since"] or None

to

    since = params.cleaned_data["since"] or 30

in the feeds.py will change the default from unlimited to 30 days.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

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

Given the times you're seeing we should at least put a pretty tight limit on the since parameter.

Suggestion inline to see whether optimization via select_related() on the queries can help. I suspect there's a very large win there.

reviewer=self.reviewer_email)
else:
history = ReviewAssignment.history.model.objects.filter(
review_request__team__acronym=obj.acronym)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
review_request__team__acronym=obj.acronym)
review_request__team__acronym=obj.acronym
).select_related("type__name", "team__acronym", "doc", "person", "state")

(also above - and will need some profiling / inspection to get the details right)

@kivinen
Copy link
Contributor Author

kivinen commented Nov 6, 2025 via email

@jennifer-richards
Copy link
Member

I.e., it will use that template to format each item in the feed, and it will need to run that template quite a few times.

Right, but if it has the data it needs that is relatively fast. As it stands, it will have an N+1 query pattern - 1 query to fetch the list of results, and then N (really N times a few) queries to look up the details for each one. The select_related() can adjust that initial query to fetch all those data in a single query. (Looking more closely at the template, it may also need prefetch_related()).

I think your profiling shows that n=365 will likely take a few seconds to process. If so, I think that's problematic - we'll at least need to rate limit that pretty strictly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSS feeds for directorates

3 participants