-
Notifications
You must be signed in to change notification settings - Fork 65
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
[MM-54589] Implement job status API #542
Conversation
@@ -29,6 +30,8 @@ require ( | |||
|
|||
replace github.com/pion/interceptor v0.1.12 => github.com/streamer45/interceptor v0.0.0-20230202152215-57f3ac9e7696 | |||
|
|||
replace github.com/mattermost/mattermost-plugin-calls/server/public => ./server/public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried to use Go workspaces to avoid this but ended up in a bit of rabbit hole with some unexpected failures on dependencies. Will look into this at another time as it's working fine for now.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #542 +/- ##
========================================
- Coverage 5.34% 5.32% -0.03%
========================================
Files 24 24
Lines 4394 4469 +75
========================================
+ Hits 235 238 +3
- Misses 4141 4214 +73
+ Partials 18 17 -1
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question:
server/bot_api.go
Outdated
state.Call.Recording.EndAt = time.Now().UnixMilli() | ||
state.Call.Recording.Err = status.Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm misreading, but every api hit will assume you're stopping the recording? We're not using the Status
field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. We are only handling one status at the moment so it doesn't matter but yes I definitely need to add a check as we'll be soon using it for the started event as well. I'll send an update 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, makes more sense now (even if only logically). Thanks!
Summary
PR adds a new bot API endpoint to explicitly report job statuses (e.g. failure, started).
Of note, we are now publishing a
github.com/mattermost/mattermost-plugin-calls/server/public
Go module with shared types. I'll slowly start to port over some common structures as needed (e.g. some of those defined in mattermost/rtcd#115). This is still subject to breaking changes and should only be used internally for the time being.Related PR
mattermost/calls-recorder#46
Ticket Link
https://mattermost.atlassian.net/browse/MM-54589