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(proxyd): betterer timeoutz #6483

Merged
merged 4 commits into from
Jul 28, 2023
Merged

feat(proxyd): betterer timeoutz #6483

merged 4 commits into from
Jul 28, 2023

Conversation

felipe-op
Copy link
Contributor

@felipe-op felipe-op commented Jul 27, 2023

Description

This change refactor timeouts.
It also introduces new WS read and write timeouts; and enforces a body size limit for WS conns.

Tests

go test ./...

Defaults

	defaultRPCTimeout           = 10 * time.Second
	defaultBodySizeLimit        = 256 * opt.KiB
	defaultWSHandshakeTimeout   = 10 * time.Second
	defaultWSReadTimeout        = 2 * time.Minute
	defaultWSWriteTimeout       = 10 * time.Second

Fixes https://linear.app/optimism/issue/INF-380/proxyd-read-limit-and-timeouts

@felipe-op felipe-op requested a review from a team as a code owner July 27, 2023 18:50
@felipe-op felipe-op requested a review from twoshark July 27, 2023 18:50
@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2023

⚠️ No Changeset found

Latest commit: 452cf2d

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

@felipe-op felipe-op requested a review from maurelian July 27, 2023 18:50
@mslipper
Copy link
Collaborator

Is there any way we could get some automated tests for these cases?

@felipe-op
Copy link
Contributor Author

Is there any way we could get some automated tests for these cases?

added

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #6483 (452cf2d) into develop (63d5a75) will increase coverage by 3.41%.
Report is 5 commits behind head on develop.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6483      +/-   ##
===========================================
+ Coverage    40.85%   44.26%   +3.41%     
===========================================
  Files          393      315      -78     
  Lines        32334    25106    -7228     
  Branches      1689        0    -1689     
===========================================
- Hits         13211    11114    -2097     
+ Misses       17682    12978    -4704     
+ Partials      1441     1014     -427     
Flag Coverage Δ
bedrock-go-tests 44.26% <ø> (+<0.01%) ⬆️
cannon-go-tests ?
chain-mon-tests ?
common-ts-tests ?
contracts-bedrock-tests ?
contracts-ts-tests ?
core-utils-tests ?
sdk-next-tests ?
sdk-tests ?

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

see 79 files with indirect coverage changes

@felipe-op felipe-op force-pushed the felipe/proxyd-timeouts branch 5 times, most recently from 28a6a95 to c55edb5 Compare July 27, 2023 21:30
@mergify
Copy link
Contributor

mergify bot commented Jul 28, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Jul 28, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Jul 28, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@OptimismBot OptimismBot merged commit e2054df into develop Jul 28, 2023
6 of 7 checks passed
@OptimismBot OptimismBot deleted the felipe/proxyd-timeouts branch July 28, 2023 00:37
@mergify mergify bot removed the on-merge-train label Jul 28, 2023
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.

4 participants