feat(server): Add maxPodLogsToRender setting (#9131)#14617
feat(server): Add maxPodLogsToRender setting (#9131)#14617crenshaw-dev merged 2 commits intoargoproj:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14617 +/- ##
==========================================
- Coverage 49.44% 49.40% -0.05%
==========================================
Files 273 272 -1
Lines 48662 47994 -668
==========================================
- Hits 24063 23713 -350
+ Misses 22237 21930 -307
+ Partials 2362 2351 -11 ☔ View full report in Codecov by Sentry. |
0ae458d to
f2db63e
Compare
0eca40b to
7fbc3e6
Compare
| } | ||
|
|
||
| if len(pods) > maxPodLogsToRender { | ||
| return errors.New("Max pods to view logs are reached. Please provide more granular query.") |
There was a problem hiding this comment.
this is the root error that ends up in the argocd throwing 500 error responses.
while I agree having a configurable limit may mitigate this to some extent, can we also solve the generic case and treat this error differently?
a 4xx response may be more fitted.
There was a problem hiding this comment.
As specifying the log query will fix the problem I took the codes.InvalidArgument which will be transformed to http.StatusBadRequest
There was a problem hiding this comment.
Maybe the variable should be removed here also?
argo-cd/server/application/application.go
Line 68 in b12630c
There was a problem hiding this comment.
Thanks @Jellyfrog for a good catch! I removed unused const.
7fbc3e6 to
7b334d2
Compare
6d85293 to
09e4113
Compare
09e4113 to
40dca79
Compare
40dca79 to
cc161d1
Compare
cc161d1 to
2b80481
Compare
|
Is there any progress? This will be my motivation to upgrade the ArgoCD version. |
The implementation is done. I'm waiting for review. |
2b80481 to
76df5f0
Compare
Signed-off-by: lukasz <lukasz.luszczynski@getyourguide.com>
76df5f0 to
3a8d1df
Compare
Signed-off-by: lukasz <lukasz.luszczynski@getyourguide.com> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: lukasz <lukasz.luszczynski@getyourguide.com> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
This PR is adding the configurable
maxPodLogsToRender. This will allow the Argo-CD administrators to allow higher number of pods logs to be rendered in UI and avoid therpc error: code = Unknown desc = Max pods to view logs are reached. Please provide more granular query.error as described in the issue #9131.Closes ISSUE #9131
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Please see Contribution FAQs if you have questions about your pull-request.