Skip to content

fix(core): adjust default timeout values and update documentation#226

Merged
j-d-ha merged 4 commits into
mainfrom
docs/update-invocation-cancellation-buffer-default
Dec 11, 2025
Merged

fix(core): adjust default timeout values and update documentation#226
j-d-ha merged 4 commits into
mainfrom
docs/update-invocation-cancellation-buffer-default

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Dec 11, 2025

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

Adjusts default timeout values in LambdaHostOptions for better production behavior and updates documentation to reflect these changes.

Changes included:

  • InitTimeout: Adjusted from 10s → 500ms → 5s (final value: 5 seconds)
  • InvocationCancellationBuffer: Updated from 3s → 500ms (final value: 500 milliseconds)
  • Documentation: Updated configuration and dependency injection guides to reflect the new default values
  • Formatting: Improved table formatting and standardized time unit display across documentation

✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests
  • I've added/updated documentation or README
  • I've followed the coding style for this project
  • I've tested the changes locally (if applicable)

🧪 Related Issues or PRs

This PR consolidates timeout default adjustments and corresponding documentation updates to ensure consistency between code and docs.

💬 Notes for Reviewers

Code changes:

  • LambdaHostOptions.cs: Updated default values for InitTimeout (5s) and InvocationCancellationBuffer (500ms)

Documentation changes:

  • docs/guides/configuration.md: Updated reference table to show correct defaults
  • docs/guides/dependency-injection.md: Updated cancellation buffer tip text
  • Both files: Improved table formatting for better readability

All example configurations using custom values (like 5 seconds in examples) remain unchanged as they are intentional configuration examples.

- Adjust `InitTimeout` default from 5 seconds to 500ms for Lambda initialization.
- Ensures faster failure handling and improved responsiveness.
- Changed `InvocationCancellationBuffer` default from 3 seconds to 500ms.
- Improves cancellation timing precision for Lambda function invocations.
- Changed `InitTimeout` default from 500ms to 5 seconds for `ILambdaOnInitBuilder.OnInit` handlers.
- Provides more time for initialization tasks to complete successfully.
- Updated `InvocationCancellationBuffer` default value to 500ms in documentation.
- Adjusted tables in dependency-injection and configuration guides for improved readability.
- Standardized time unit formatting across tables (e.g., `500 ms` to `500ms`).
@github-actions github-actions Bot added the type: fix Bug fix label Dec 11, 2025
@j-d-ha j-d-ha changed the title fix(lambda-host-options): adjust default timeout values and update documentation fix(core): adjust default timeout values and update documentation Dec 11, 2025
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Dec 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #226   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files         106      106           
  Lines        2277     2277           
  Branches      256      256           
=======================================
  Hits         2025     2025           
  Misses        160      160           
  Partials       92       92           
Files with missing lines Coverage Δ
...c/AwsLambda.Host/Core/Options/LambdaHostOptions.cs 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb9caf1...89f723a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ncipollina ncipollina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔥 LGTM!

@j-d-ha
j-d-ha merged commit 9119619 into main Dec 11, 2025
14 of 15 checks passed
@j-d-ha
j-d-ha deleted the docs/update-invocation-cancellation-buffer-default branch December 11, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants