mattermost / mattermost-plugin-apps

Powers the Mattermost App Framework
https://developers.mattermost.com/integrate/apps/
Apache License 2.0
33 stars 29 forks source link

[MM-53016] Pass timeout to outgoing request to MM server #476

Closed hanzei closed 1 year ago

hanzei commented 1 year ago

Summary

Since v8 model.Client accepts a context.Context(). This PR makes use of the new functionality by passing down the request context, which ensures the request gets cancelled if it times out.

The PR also includes the telemetry fix from https://github.com/mattermost/mattermost-plugin-jira/pull/930.

Ticket Link

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

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 6.66% and project coverage change: -0.02% :warning:

Comparison is base (b235e01) 20.13% compared to head (afac1fe) 20.12%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #476 +/- ## ========================================== - Coverage 20.13% 20.12% -0.02% ========================================== Files 80 80 Lines 6605 6609 +4 ========================================== Hits 1330 1330 - Misses 5143 5147 +4 Partials 132 132 ``` | [Files Changed](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost) | Coverage Δ | | |---|---|---| | [apps/app.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-YXBwcy9hcHAuZ28=) | `0.00% <ø> (ø)` | | | [apps/context.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-YXBwcy9jb250ZXh0Lmdv) | `36.36% <ø> (ø)` | | | [apps/expand.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-YXBwcy9leHBhbmQuZ28=) | `15.27% <ø> (ø)` | | | [server/config/config.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL2NvbmZpZy9jb25maWcuZ28=) | `34.61% <ø> (ø)` | | | [server/config/mattermost\_config\_service.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL2NvbmZpZy9tYXR0ZXJtb3N0X2NvbmZpZ19zZXJ2aWNlLmdv) | `0.00% <ø> (ø)` | | | [server/config/service.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL2NvbmZpZy9zZXJ2aWNlLmdv) | `0.00% <ø> (ø)` | | | [server/config/test\_service.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL2NvbmZpZy90ZXN0X3NlcnZpY2UuZ28=) | `0.00% <ø> (ø)` | | | [server/proxy/bindings.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL3Byb3h5L2JpbmRpbmdzLmdv) | `32.00% <ø> (ø)` | | | [server/proxy/expand\_getter.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL3Byb3h5L2V4cGFuZF9nZXR0ZXIuZ28=) | `0.00% <0.00%> (ø)` | | | [server/proxy/install.go](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL3Byb3h5L2luc3RhbGwuZ28=) | `0.00% <ø> (ø)` | | | ... and [12 more](https://app.codecov.io/gh/mattermost/mattermost-plugin-apps/pull/476?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.