Disable ingress session flag update#935
Conversation
|
| string participant_metadata = 14; | ||
| bool reusable = 11; | ||
| IngressState state = 12; // Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth) | ||
| optional bool session_enabled = 16; |
There was a problem hiding this comment.
I would simply use enabled here, rather than session_enabled as we currently do not use a session semantic in this API. Please also add a comment specifying that when false, new connection attempts to this ingress will fail, and that the default value is true.
| IngressVideoOptions video = 7; | ||
|
|
||
| // NEXT_ID: 11 | ||
| optional bool session_enabled = 11; |
There was a problem hiding this comment.
Please update this similarly to above.
|
The validation code in |
| ErrNoResponse = psrpc.NewErrorf(psrpc.Unavailable, "no response from ingress service") | ||
| ErrInvalidOutputDimensions = NewInvalidVideoParamsError("invalid output media dimensions") | ||
| ErrInvalidIngressType = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid ingress type") | ||
| ErrSessionDisabled = psrpc.NewErrorf(psrpc.PermissionDenied, "session is disabled") |
There was a problem hiding this comment.
Please also rename the error to ErrIngressDisabled.
There was a problem hiding this comment.
Got it, thanks for the feedback. I'll be working on it.
There was a problem hiding this comment.
Hey @biglittlebigben I updated the branch with the feedback you requested:
- ErrIngressDisabled for the new error variable
- ValidateForSerialization in ingress/validation.go checking the enabled flag.
- session_enabled now is just enabled.
- CreateIngressRequest message includes the flag too.
And i updated the bootstrap script with the versions i see they are being used in main for those protoc dependencies.
And I have a question about the compiled proto that is causing conflicts here: replay/cloud_replay.pb.go. The conflict is because is the only file compiled with different versions of protoc and protoc-gen-go:
// protoc-gen-go v1.31.0
// protoc v4.24.3
Was this on purpose?
Do you want me to compile that single file with those old versions and push it or will the same versions be used now as in the rest of the project?
Let me know if something is missing, thanks in advance.
… enabled flag (useful for ingressWithUrl), ValidateForSerialization throws error if url input and enabled flag set false
biglittlebigben
left a comment
There was a problem hiding this comment.
Please see further comments. With regard to the conflict, the files generated by the Github action are the ones that should end up merged in the repository, and any conflict should be resolved accordingly.
| go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 | ||
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3 | ||
| go install github.com/livekit/psrpc/protoc-gen-psrpc@v0.5.1 | ||
| go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.0 |
There was a problem hiding this comment.
Please remove this change from this PR and create a separate PR for this version change if you believe this is needed, since this is unrelated to the initial PR purpose. Keeping unrelated changes to separate PRs help debugging and backing out a broken patch when needed.
| return ErrInvalidIngress("no source URL") | ||
| } | ||
| if info.Enabled != nil && !*info.Enabled { | ||
| return ErrIngressDisabled |
There was a problem hiding this comment.
Please return ErrInvalidIngress("disabled non reusable ingress"), or a similar message. The issue here is that the ingress has an inconsistent set of parameters, not that is it merely disabled.
| string participant_metadata = 14; | ||
| bool reusable = 11; | ||
| IngressState state = 12; // Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth) | ||
| optional bool enabled = 16; // The default value is true and when set to false, the new connection attempts will be rejected |
There was a problem hiding this comment.
Also, just realizing while looking at the livekit SFU patch: this should not be optional as it is an output, so the returned value should always be explicit.
There was a problem hiding this comment.
Got it, makes sense
Thanks
…ingress fixed, ingressInfo enabled not longer an optional
|
Hey @biglittlebigben I just updated the pr with your feedback. |
biglittlebigben
left a comment
There was a problem hiding this comment.
This looks good to me. Please approve the CLA and fix the conflict and I'll merge.
Thanks. |
New Enabled flags on createIngress and updateIngress to have the ability to disable ingress sessions without having to remove the entire session and lose the streamkey