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

regression: prevent unhandled exception from apps statistics #32701

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

sampaiodiego
Copy link
Member

@sampaiodiego sampaiodiego commented Jun 28, 2024

Proposed changes (including videos or screenshots)

Added a try/catch to prevent errors and also memoized the function result since it should not change that often.

Issue(s)

Steps to test or reproduce

Further comments

=== UnHandledPromiseRejection ===
Error: Request "jdqmnf7icud" for method "app:getStatus" timed out
    at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/server/runtime/deno/AppsEngineDenoRuntime.js:241:24)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
 => awaited here:
    at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
    at app/statistics/server/lib/getAppsStatistics.ts:33:16
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
    at app/statistics/server/lib/getAppsStatistics.ts:29:2
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
    at app/metrics/server/lib/collectMetrics.ts:42:52
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
---------------------------------
Errors like this can cause oplog processing errors.
Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
Future node.js versions will automatically exit the process
=================================

Copy link
Contributor

dionisio-bot bot commented Jun 28, 2024

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jun 28, 2024

⚠️ No Changeset found

Latest commit: 64124f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@sampaiodiego sampaiodiego added this to the 6.10 milestone Jun 28, 2024
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-6.10.0@c6add10). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##             release-6.10.0   #32701   +/-   ##
=================================================
  Coverage                  ?   56.75%           
=================================================
  Files                     ?     2499           
  Lines                     ?    55407           
  Branches                  ?    11461           
=================================================
  Hits                      ?    31445           
  Misses                    ?    21273           
  Partials                  ?     2689           
Flag Coverage Δ
e2e 56.47% <ø> (?)
unit 71.87% <ø> (?)

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

@sampaiodiego sampaiodiego marked this pull request as ready for review June 28, 2024 22:09
@d-gubert d-gubert merged commit a9f8c8e into release-6.10.0 Jun 28, 2024
48 checks passed
@d-gubert d-gubert deleted the regression-prevent-app-stats-fail branch June 28, 2024 22:10
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