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

[Access] Make REST message size limit configurable #6596

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

Conversation

AndriiDiachuk
Copy link
Contributor

Closes: #6566

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 32.43243% with 25 lines in your changes missing coverage. Please review.

Project coverage is 41.20%. Comparing base (681dd9a) to head (1665474).

Files with missing lines Patch % Lines
cmd/access/node_builder/access_node_builder.go 0.00% 12 Missing ⚠️
cmd/observer/node_builder/observer_builder.go 0.00% 12 Missing ⚠️
engine/access/rest/server.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6596   +/-   ##
=======================================
  Coverage   41.19%   41.20%           
=======================================
  Files        2052     2052           
  Lines      182191   182209   +18     
=======================================
+ Hits        75062    75080   +18     
  Misses     100839   100839           
  Partials     6290     6290           
Flag Coverage Δ
unittests 41.20% <32.43%> (+<0.01%) ⬆️

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

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

@Guitarheroua Guitarheroua self-requested a review October 29, 2024 10:58
Copy link
Collaborator

@Guitarheroua Guitarheroua left a comment

Choose a reason for hiding this comment

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

Looks good to me

@@ -1508,6 +1513,10 @@ func (builder *FlowAccessNodeBuilder) extraFlags() {
return errors.New("execution-data-indexing-enabled must be set if check-payer-balance is enabled")
}

if builder.rpcConf.RestConfig.MaxRequestSize <= 0 {
return errors.New("rest-max-request-size must be greater than or equal to 0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return errors.New("rest-max-request-size must be greater than or equal to 0")
return errors.New("rest-max-request-size must be greater than 0")

@@ -851,6 +856,10 @@ func (builder *ObserverServiceBuilder) extraFlags() {
}
}

if builder.rpcConf.RestConfig.MaxRequestSize <= 0 {
return errors.New("rest-max-request-size must be greater than or equal to 0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return errors.New("rest-max-request-size must be greater than or equal to 0")
return errors.New("rest-max-request-size must be greater than 0")

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.

[Access] Make REST message size limit configurable
4 participants