Skip to content
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

feat: explicit names for meetecho recordings #8062

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

rjsparks
Copy link
Member

@rjsparks rjsparks commented Oct 21, 2024

fixes #3454

@rjsparks
Copy link
Member Author

rjsparks commented Oct 21, 2024

This gets us a step closer to not providing links when recordings don't exist. (see #7888)
Once we know we can expect explicit names (at some point in the future) we can change the functions to not return a link when there's no name given.

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.

Couple small nits.

I wonder if it'd make sense to simply make this the .../recording URL endpoint instead of specializing it. The structure of the payload would lend itself to other metadata relatively transparently. OTOH maybe it's better to plan on retiring this endpoint when that happens rather than mutating its behavior.

self.assertContains(r, "Restricted to role: Recording Manager", status_code=403)

r = self.client.post(url, {"apikey": apikey.hash()})
self.assertContains(r, "Too long since last regular login", status_code=400)
Copy link
Member

Choose a reason for hiding this comment

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

If we don't already, we ought to cover features like this in a unit test of the require_api_key() decorator and trust that. (Not actually asking for a change here unless you're enthusiastic about it, just pointing it out.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I felt the lack-of-reuse pain, but didn't pursue it as I think we might want to rework all of these to use DRF going forward maybe?

ietf/api/urls.py Outdated
@@ -39,6 +39,8 @@
url(r'^iesg/position', views_ballot.api_set_position),
# Let Meetecho set session video URLs
url(r'^meeting/session/video/url$', meeting_views.api_set_session_video_url),
# Let Meetecho tell us the name of its recordings
url(r'meeting/session/recordingname$', meeting_views.api_set_meetecho_recording_name),
Copy link
Member

Choose a reason for hiding this comment

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

Need a ^ at the start.

Maybe make it ^meeting/session/recording-name to better match recording_name in the model (and kebab-case that we've used in other URLs, like doc/draft-aliases/ at line 27)

Copy link
Member Author

Choose a reason for hiding this comment

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

will get the ^.
I can kebob case it, but I don't think we have consistency there.

name = self.meetecho_recording_name
if name is None or name.strip() == "":
name = self._session_recording_url_label()
if url_formatter.strip()!="" and name is not None:
Copy link
Member

Choose a reason for hiding this comment

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

style nit: spacing around !=

@rjsparks
Copy link
Member Author

we may need to use (build on top of) the recording url endpoint for non-meetecho generated youtube videos (e.g. those for MOQ right now).

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.89%. Comparing base (c7f6bde) to head (e6c53bd).
Report is 123 commits behind head on main.

Files with missing lines Patch % Lines
ietf/meeting/models.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8062      +/-   ##
==========================================
+ Coverage   88.78%   88.89%   +0.10%     
==========================================
  Files         296      304       +8     
  Lines       41320    41345      +25     
==========================================
+ Hits        36687    36754      +67     
+ Misses       4633     4591      -42     

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

@rjsparks rjsparks merged commit 8881010 into ietf-tools:main Oct 21, 2024
9 checks passed
@rjsparks rjsparks deleted the meetecho_recording_name branch October 21, 2024 21:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build API to capture URLs to Meetecho hosted video recordings for a Session
2 participants