Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Setting butler request size limit for 50mb by default #1228

Merged
merged 3 commits into from
May 13, 2021

Conversation

lucasbfernandes
Copy link
Contributor

Fix: Request entity too large caused by large payloads sent from metacontroller.

Signed-off-by: Lucas Borges Fernandes <lucasbfernandes94@gmail.com>
@boring-cyborg boring-cyborg bot added the butler Improvements/additions/fixes for butler module. label May 13, 2021
@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #1228 (51713b4) into charlescd-release-1.0.0 (b8e0cca) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                    Coverage Diff                     @@
##             charlescd-release-1.0.0    #1228   +/-   ##
==========================================================
  Coverage                      76.89%   76.89%           
  Complexity                      2177     2177           
==========================================================
  Files                           1307     1306    -1     
  Lines                          18736    18718   -18     
  Branches                        1711     1710    -1     
==========================================================
- Hits                           14407    14394   -13     
+ Misses                          3826     3821    -5     
  Partials                         503      503           
Flag Coverage Δ Complexity Δ
butler 84.52% <100.00%> (+0.07%) 0.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
butler/src/app/v2/core/config/configurations.ts 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
ui/src/modules/Modules/Comparation/Form/index.tsx 80.00% <100.00%> (ø) 0.00 <0.00> (ø)
...les/Settings/Credentials/Sections/Webhook/hooks.ts 66.00% <100.00%> (+0.69%) 0.00 <0.00> (ø)
...es/Settings/Credentials/Sections/Webhook/index.tsx 74.07% <100.00%> (ø) 0.00 <0.00> (ø)
...i/deployments/controller/deployments.controller.ts 85.71% <0.00%> (-0.40%) 0.00% <0.00%> (ø%)
ui/src/mocks/handlers/modules/responses.ts 100.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../pipes/default-circle-namespace-uniqueness.pipe.ts
...or/logs-aggregator/kubernetes-events-aggregator.ts 92.43% <0.00%> (+3.09%) 0.00% <0.00%> (ø%)
ui/src/modules/Modules/Comparation/View/index.tsx 86.66% <0.00%> (+5.41%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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

Signed-off-by: Lucas Borges Fernandes <lucasbfernandes94@gmail.com>
Copy link

@fandrade-zup fandrade-zup left a comment

Choose a reason for hiding this comment

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

2 comments on helm chart

@@ -110,6 +110,8 @@ env:
value: "http://charlescd-butler.{{ .ChartContext.Release.Namespace }}.svc.cluster.local:3000"
- name: BUTLER_NAMESPACE
value: {{ .ChartContext.Release.Namespace }}
- name: REQUEST_SIZE_LIMIT
value: {{ .RangeContext.requestSizeLimit }}

Choose a reason for hiding this comment

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

The right way is passing the value in quotes:

value: {{ .RangeContext.requestSizeLimit | default 50mb| quote}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed here 51713b4

@@ -46,6 +46,7 @@ CharlesApplications:
password: 3f2Yq8R4HhDCnefR
name: charlescd_butler
ssl: false
requestSizeLimit: '50mb'

Choose a reason for hiding this comment

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

Right way is:
requestSizeLimit: 50mb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed here 51713b4

Signed-off-by: Lucas Borges Fernandes <lucasbfernandes94@gmail.com>
Copy link

@fandrade-zup fandrade-zup left a comment

Choose a reason for hiding this comment

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

LGTM

@angelicalimazup angelicalimazup merged commit 46903dc into charlescd-release-1.0.0 May 13, 2021
@angelicalimazup angelicalimazup deleted the fix-hook-request-limit branch May 13, 2021 20:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
butler Improvements/additions/fixes for butler module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants