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

feat: apps-engine timeout config #33690

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

d-gubert
Copy link
Member

@d-gubert d-gubert commented Oct 21, 2024

Proposed changes (including videos or screenshots)

Make the Apps-Engine runtime accept the APPS_ENGINE_RUNTIME_TIMEOUT environment variable to configure the time limit for requests to the Deno subprocess.
Also, makes calls to Pre app event methods follow the same "global" timeout, instead of the shorter 1 second.

We've had reports of some environments having timeouts where the request was actually expected to take a longer time to resolve.

Default timeout is increased to 30

Issue(s)

SUP-690

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Oct 21, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: 6703cbc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
@rocket.chat/apps-engine Minor
@rocket.chat/meteor Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 21, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33690/
on branch gh-pages at 2024-10-21 19:25 UTC

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.97%. Comparing base (5fddfcc) to head (6703cbc).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #33690      +/-   ##
===========================================
- Coverage    74.97%   74.97%   -0.01%     
===========================================
  Files          480      480              
  Lines        21019    21021       +2     
  Branches      5334     5335       +1     
===========================================
  Hits         15760    15760              
- Misses        4630     4632       +2     
  Partials       629      629              
Flag Coverage Δ
unit 74.97% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@d-gubert d-gubert marked this pull request as ready for review October 21, 2024 17:51
@d-gubert d-gubert requested a review from a team as a code owner October 21, 2024 17:51
@@ -53,11 +53,6 @@ export class ProxiedApp {
public async call(method: `${AppMethod}`, ...args: Array<any>): Promise<any> {
let options;

// Pre events need to be fast as they block the user
if (method.startsWith('checkPre') || method.startsWith('executePre')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably the only part i don't like. If PRE callbacks block the use, if a user registers a executePreMessageSent that takes the full timeout, it would take 30s by default.

For normal handlers that's good but for these, i wonder if they should have their own env, and maybe a smaller default value.

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.

2 participants