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

Allow to use ManifestID provided by AuthWebhook in HTTP push flow #1627

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

darkdarkdragon
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Allow to use ManifestID provided by AuthWebhook in HTTP push flow

Specific updates (required)
Added map that keeps mapping between ManifestID sent in HTTP push URL and one provided by webhook

How did you test each of these updates (required)
Added unit tests

Does this pull request close any open issues?
Fixes #1528

server/mediaserver.go Show resolved Hide resolved
@iameli
Copy link
Member

iameli commented Oct 15, 2020

Presently doing an integration test with this in mdw-staging

@darkdarkdragon darkdarkdragon force-pushed the it/manifest branch 2 times, most recently from 0eaea7e to 824bb89 Compare October 15, 2020 19:38
@iameli
Copy link
Member

iameli commented Oct 15, 2020

Seems to be working well.

@yondonfu
Copy link
Member

Hm I see there was a force push with 824bb89, but doesn't look like anything changed? Was that intended @darkdarkdragon ?

@iameli
Copy link
Member

iameli commented Oct 15, 2020

I think that was a rebase onto master to pick up your auth token branch

@@ -701,7 +713,7 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) {

// Start a watchdog to remove session after a period of inactivity
ticker := time.NewTicker(httpPushTimeout)
go func(s *LivepeerServer, mid core.ManifestID) {
go func(s *LivepeerServer, intmid, extmid core.ManifestID) {
Copy link
Member

Choose a reason for hiding this comment

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

Only need to pass in extmid here since removeRTMPStream() just needs the external manifestID now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 63d4ab6
Need both arguments because we also need to index rtmpConnections inside watchdog function.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see...Got it. Perhaps there is room for further hiding the notion of an internal manifestID in this case so a user of rtmpConnections only ever has to worry about the external manifestID...think that's fine to address separately.

Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

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

LGTM after squashing the fixup commits.

@@ -701,7 +713,7 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) {

// Start a watchdog to remove session after a period of inactivity
ticker := time.NewTicker(httpPushTimeout)
go func(s *LivepeerServer, mid core.ManifestID) {
go func(s *LivepeerServer, intmid, extmid core.ManifestID) {
Copy link
Member

Choose a reason for hiding this comment

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

Oh I see...Got it. Perhaps there is room for further hiding the notion of an internal manifestID in this case so a user of rtmpConnections only ever has to worry about the external manifestID...think that's fine to address separately.

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.

Webhook manifestID breaks HTTP push
3 participants