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

[MM-56920] Allow passing SiteURL override for jobs #640

Merged
merged 4 commits into from
Mar 1, 2024
Merged

Conversation

streamer45
Copy link
Contributor

@streamer45 streamer45 commented Feb 19, 2024

Summary

By default our jobs use the SiteURL from config in order to connect. To allow connection from within a local network in production we need to add some overrides.

Related PR

mattermost/calls-recorder#64

Ticket Link

https://mattermost.atlassian.net/browse/MM-56920

@codecov-commenter
Copy link

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (e1e08bc) 9.30% compared to head (d5c5951) 9.34%.

Files Patch % Lines
server/job_service.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #640      +/-   ##
========================================
+ Coverage   9.30%   9.34%   +0.04%     
========================================
  Files         26      26              
  Lines       5308    5316       +8     
========================================
+ Hits         494     497       +3     
- Misses      4761    4767       +6     
+ Partials      53      52       -1     

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

Comment on lines -172 to -178
// initialize some basic state.
await Promise.all([
getMe()(store.dispatch, store.getState),
getMyPreferences()(store.dispatch, store.getState),
getMyTeams()(store.dispatch, store.getState),
getMyTeamMembers()(store.dispatch, store.getState),
]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slightly unrelated but when investigating the flow of requests I figured these were not needed for the recorder. In fact they would all fail as unauthorized since the bot wouldn't be logged in. So we are moving them on the global widget logic .

Comment on lines 80 to 83
getMe()(store.dispatch, store.getState),
getMyPreferences()(store.dispatch, store.getState),
getMyTeams()(store.dispatch, store.getState),
getMyTeamMembers()(store.dispatch, store.getState),
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think all of these can be done like in like 84, e.g. store.dispatch(getMe()). But no big deal either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah, after years I am still confused by actions. I'll update.

@cpoile cpoile added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Feb 29, 2024
@streamer45 streamer45 removed the Docs Needed Requires documentation label Mar 1, 2024
@streamer45 streamer45 merged commit 376e684 into main Mar 1, 2024
6 checks passed
@streamer45 streamer45 deleted the MM-56920 branch March 1, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants