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: Add Koa Server Request Timeout #2504

Merged
merged 6 commits into from
May 28, 2024
Merged

Conversation

Nana-EC
Copy link
Collaborator

@Nana-EC Nana-EC commented May 17, 2024

Description:
Add Koa Server Request Timeout

Related issue(s):

Fixes #2503

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
@Nana-EC Nana-EC added enhancement New feature or request P1 labels May 17, 2024
@Nana-EC Nana-EC added this to the 0.48.0 milestone May 17, 2024
@Nana-EC Nana-EC self-assigned this May 17, 2024
@Nana-EC Nana-EC changed the title Add Koa Server Request Timeout feat: Add Koa Server Request Timeout May 17, 2024
Copy link

github-actions bot commented May 17, 2024

Tests

    2 files  149 suites   13s ⏱️
833 tests 832 ✔️ 1 💤 0
845 runs  844 ✔️ 1 💤 0

Results for commit ddbd07c.

♻️ This comment has been updated with latest results.

@Nana-EC Nana-EC requested a review from quiet-node May 17, 2024 04:55
Copy link

github-actions bot commented May 17, 2024

Acceptance Tests

     39 files     633 suites   1h 6m 8s ⏱️
   593 tests    581 ✔️   3 💤   9
2 668 runs  2 599 ✔️ 37 💤 32

Results for commit ddbd07c.

♻️ This comment has been updated with latest results.

const server = await app.listen({ port: process.env.SERVER_PORT || 7546 });

// set request timeout to ensure sockets are closed after specified time
const requestTimeoutMs = parseInt(process.env.SERVER_REQUEST_TIMEOUT_MS!) || 30000;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Set timeout appropriately.
Maybe 60 secs or more.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.


// set request timeout to ensure sockets are closed after specified time
const requestTimeoutMs = parseInt(process.env.SERVER_REQUEST_TIMEOUT_MS!) || 30000;
server.setTimeout(requestTimeoutMs);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add a test to confirm relay sends timeout in this case

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

@@ -2021,4 +2081,23 @@ describe('@api-batch-3 RPC Server Acceptance Tests', function () {
}
});
});

describe.only('Koa Server Timeout', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove .only

Copy link
Collaborator

Choose a reason for hiding this comment

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

Apologies, done.

@@ -2021,4 +2081,23 @@ describe('@api-batch-3 RPC Server Acceptance Tests', function () {
}
});
});

describe.only('Koa Server Timeout', () => {
it.only('should timeout a request after the specified time', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove .only

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

@@ -22,4 +22,5 @@ BATCH_REQUESTS_ENABLED=true
TEST_GAS_PRICE_DEVIATION=0.2
WS_NEW_HEADS_ENABLED=false
INITIAL_BALANCE='5000000000'
LIMIT_DURATION=90000
LIMIT_DURATION=90000,
SERVER_REQUEST_TIMEOUT_MS=3000
Copy link
Collaborator

Choose a reason for hiding this comment

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

empty line

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

@ebadiere ebadiere assigned ebadiere and unassigned Nana-EC May 21, 2024
@ebadiere ebadiere marked this pull request as ready for review May 21, 2024 17:51
@ebadiere ebadiere requested review from AlfredoG87 and a team as code owners May 21, 2024 17:51
packages/server/src/index.ts Outdated Show resolved Hide resolved

chai.use(chaiExclude);

const sendJsonRpcRequestWithDelay = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest moving this method to helpers/utils.js or somewhere else to keep the batch 3 file clean. Also remove unsed import statements.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

@@ -15,3 +15,4 @@ SUBSCRIPTIONS_ENABLED=true
FILTER_API_ENABLED=true
DEBUG_API_ENABLED=true
TEST_GAS_PRICE_DEVIATION=0.2
SERVER_REQUEST_TIMEOUT_MS=60000
Copy link
Collaborator

Choose a reason for hiding this comment

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

empty line

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

@quiet-node quiet-node removed this from the 0.48.0 milestone May 21, 2024
@quiet-node
Copy link
Collaborator

runnng the newly added test on local keep getting this error

1) RPC Server Acceptance Tests
       Acceptance tests
         @api-batch-3 RPC Server Acceptance Tests
           Koa Server Timeout
             should timeout a request after the specified time:
     AssertionError: expected undefined to equal 'ECONNRESET'
      at Suite.<anonymous> (packages/server/tests/acceptance/rpc_batch3.spec.ts:2038:29)
      at Generator.next (<anonymous>)
      at fulfilled (packages/server/tests/acceptance/rpc_batch3.spec.ts:47:58)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

Copy link
Collaborator

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

Also we need to restore

import chaiExclude from 'chai-exclude';


// set request timeout to ensure sockets are closed after specified time of inactivity
const requestTimeoutMs = parseInt(process.env.SERVER_REQUEST_TIMEOUT_MS || '60000');
server.setTimeout(requestTimeoutMs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The setTimeout method allows to send a callback function that will be executed in case a timeout is executed:
image

I think we should use it to capture metrics of timeouts.

however, we don't have the registry yet in here...

so I was thinking if we can change the approach and do something like this??

I haven't tested this yet, but basically uses:
https://www.npmjs.com/package/koa-timeout

and move it to file Server.ts

and do it something like this:

// Custom middleware to increment the metric on timeout
app.use(async (ctx, next) => {
  try {
    await next();
  } catch (err) {
    if (err.message === 'Request timeout') {
      // Increment the timeout metric here
      // For example, using a metric library like Prometheus:
      // prometheusClient.counter('request_timeouts_total').inc();
      console.log('Request timeout reached');
    }
    throw err;
  }
});

// Apply the timeout middleware
app.use(timeout(5000)); // Set the timeout value in milliseconds

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 76.99%. Comparing base (8b45ca8) to head (36df19b).
Report is 12 commits behind head on main.

Current head 36df19b differs from pull request most recent head f45244c

Please upload reports for the commit f45244c to get more accurate results.

Files Patch % Lines
packages/relay/src/lib/eth.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2504      +/-   ##
==========================================
- Coverage   77.26%   76.99%   -0.27%     
==========================================
  Files          40       40              
  Lines        3229     3226       -3     
  Branches      663      667       +4     
==========================================
- Hits         2495     2484      -11     
- Misses        525      526       +1     
- Partials      209      216       +7     

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

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added doc updated.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped timeout to 60 seconds.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: removed only.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added empty line.

Signed-off-by: ebadiere <ebadiere@gmail.com>

Update packages/server/src/index.ts

Co-authored-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Eric Badiere <ebadiere@gmail.com>

fix: Applied feedback

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added back the chai.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Restored the chai exclude

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed the async in the sendJsonRpcRequestWithDelay

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Reduced the timeout to allow tests to finish.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Moved timeout test to rateLimiter.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed comma after LIMIT_DURATION

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped up the timeout delay to ensure it works in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Testing in CI.  Removed the .only

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Adjusted the test delay.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added error details.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added more debug info.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added delay for linux.  Debugging in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Setting test timeout

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Nested promise.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Including delay in testfile.  Debugging CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CIfix: Debugging in CI.  Updated package-log.
Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Extracted setting logic to util function to be used in server startup and test framework

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix:  Bumped up the timeout for tests on local node.

Signed-off-by: ebadiere <ebadiere@gmail.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
@quiet-node quiet-node added this to the 0.48.0 milestone May 24, 2024
Copy link
Collaborator

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

The test passed 🎊 🥂!!!
Some questions and suggestions.

.github/workflows/acceptance.yml Show resolved Hide resolved
@@ -9307,6 +9307,7 @@
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz",
"integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==",
"dev": true,
"hasInstallScript": true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering how come we have these changes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The package-lock.json was mentioned as a suspect when we met to discuss the failing test in CI, so I included it. The hasInstallScript indicates that a package has an install script to run when installing.

@@ -158,4 +158,29 @@ describe('@ratelimiter Rate Limiters Acceptance Tests', function () {
});
});
});

describe('Koa Server Timeout', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either we can cancel the server-config CI and have this test here, or we keep the server-config CI and remove this test in ratelimiter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed. That got missed in the back and forth. Removing.

import { expect } from 'chai';
import { Utils } from '../helpers/utils';

describe('@server-config Rate Limiters Acceptance Tests', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either we can cancel the server-config CI and have this test in ratelimiter, or we keep the server-config CI and remove this test here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, see comment above and updated tests title.

packages/server/src/koaJsonRpc/lib/utils.ts Show resolved Hide resolved
packages/server/tests/helpers/utils.ts Show resolved Hide resolved
Signed-off-by: ebadiere <ebadiere@gmail.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Copy link

sonarcloud bot commented May 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

LGTM

@quiet-node quiet-node merged commit 53e5e4b into main May 28, 2024
35 checks passed
@quiet-node quiet-node deleted the 2503-add-server-timeout branch May 28, 2024 15:37
quiet-node pushed a commit that referenced this pull request May 28, 2024
* Add Koa Server Request Timeout

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>

* fix: Added test and documentation to the server request timeout setting.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added doc updated.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped timeout to 60 seconds.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: removed only.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added empty line.

Signed-off-by: ebadiere <ebadiere@gmail.com>

Update packages/server/src/index.ts

Co-authored-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Eric Badiere <ebadiere@gmail.com>

fix: Applied feedback

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added back the chai.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Restored the chai exclude

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed the async in the sendJsonRpcRequestWithDelay

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Reduced the timeout to allow tests to finish.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Moved timeout test to rateLimiter.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed comma after LIMIT_DURATION

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped up the timeout delay to ensure it works in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Testing in CI.  Removed the .only

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Adjusted the test delay.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added error details.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added more debug info.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added delay for linux.  Debugging in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Setting test timeout

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Nested promise.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Including delay in testfile.  Debugging CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CIfix: Debugging in CI.  Updated package-log.
Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Extracted setting logic to util function to be used in server startup and test framework

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix:  Bumped up the timeout for tests on local node.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Moved into its own CI job.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Cleanup

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Clean up.

Signed-off-by: ebadiere <ebadiere@gmail.com>

---------

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Co-authored-by: ebadiere <ebadiere@gmail.com>
@quiet-node quiet-node mentioned this pull request May 28, 2024
2 tasks
quiet-node pushed a commit that referenced this pull request May 28, 2024
* Add Koa Server Request Timeout

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>

* fix: Added test and documentation to the server request timeout setting.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added doc updated.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped timeout to 60 seconds.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: removed only.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added empty line.

Signed-off-by: ebadiere <ebadiere@gmail.com>

Update packages/server/src/index.ts

Co-authored-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Eric Badiere <ebadiere@gmail.com>

fix: Applied feedback

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added back the chai.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Restored the chai exclude

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed the async in the sendJsonRpcRequestWithDelay

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Reduced the timeout to allow tests to finish.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Moved timeout test to rateLimiter.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed comma after LIMIT_DURATION

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped up the timeout delay to ensure it works in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Testing in CI.  Removed the .only

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Adjusted the test delay.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added error details.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added more debug info.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added delay for linux.  Debugging in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Setting test timeout

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Nested promise.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Including delay in testfile.  Debugging CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CIfix: Debugging in CI.  Updated package-log.
Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Extracted setting logic to util function to be used in server startup and test framework

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix:  Bumped up the timeout for tests on local node.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Moved into its own CI job.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Cleanup

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Clean up.

Signed-off-by: ebadiere <ebadiere@gmail.com>

---------

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Co-authored-by: ebadiere <ebadiere@gmail.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
quiet-node pushed a commit that referenced this pull request May 28, 2024
* Add Koa Server Request Timeout

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>

* fix: Added test and documentation to the server request timeout setting.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added doc updated.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped timeout to 60 seconds.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: removed only.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added empty line.

Signed-off-by: ebadiere <ebadiere@gmail.com>

Update packages/server/src/index.ts

Co-authored-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Eric Badiere <ebadiere@gmail.com>

fix: Applied feedback

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added back the chai.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Restored the chai exclude

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed the async in the sendJsonRpcRequestWithDelay

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Reduced the timeout to allow tests to finish.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Moved timeout test to rateLimiter.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Removed comma after LIMIT_DURATION

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Bumped up the timeout delay to ensure it works in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Testing in CI.  Removed the .only

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Adjusted the test delay.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added error details.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added more debug info.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Added delay for linux.  Debugging in CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Setting test timeout

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CI.  Nested promise.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Including delay in testfile.  Debugging CI.

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Debugging in CIfix: Debugging in CI.  Updated package-log.
Signed-off-by: ebadiere <ebadiere@gmail.com>

fix: Extracted setting logic to util function to be used in server startup and test framework

Signed-off-by: ebadiere <ebadiere@gmail.com>

fix:  Bumped up the timeout for tests on local node.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Moved into its own CI job.

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Cleanup

Signed-off-by: ebadiere <ebadiere@gmail.com>

* fix: Clean up.

Signed-off-by: ebadiere <ebadiere@gmail.com>

---------

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Co-authored-by: ebadiere <ebadiere@gmail.com>
quiet-node added a commit that referenced this pull request May 28, 2024
feat: Add Koa Server Request Timeout (#2504)

* Add Koa Server Request Timeout



* fix: Added test and documentation to the server request timeout setting.



fix: Added doc updated.



fix: Bumped timeout to 60 seconds.



fix: removed only.



fix: Added empty line.



Update packages/server/src/index.ts




fix: Applied feedback



fix: Added back the chai.



fix: Restored the chai exclude



fix: Removed the async in the sendJsonRpcRequestWithDelay



fix: Reduced the timeout to allow tests to finish.



fix: Moved timeout test to rateLimiter.



fix: Removed comma after LIMIT_DURATION



fix: Bumped up the timeout delay to ensure it works in CI.



fix: Testing in CI.  Removed the .only



fix: Adjusted the test delay.



fix: Added error details.



fix: Added more debug info.



fix: Added delay for linux.  Debugging in CI.



fix: Debugging in CI.  Setting test timeout



fix: Debugging in CI.  Nested promise.



fix: Including delay in testfile.  Debugging CI.



fix: Debugging in CIfix: Debugging in CI.  Updated package-log.


fix: Extracted setting logic to util function to be used in server startup and test framework



fix:  Bumped up the timeout for tests on local node.



* fix: Moved into its own CI job.



* fix: Cleanup



* fix: Clean up.



---------

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Co-authored-by: Nana Essilfie-Conduah <56320167+Nana-EC@users.noreply.github.com>
Co-authored-by: ebadiere <ebadiere@gmail.com>
@quiet-node quiet-node modified the milestones: 0.48.0, 0.48.1 May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add Koa Server request timeout
5 participants