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

logs on demand #455

Merged
merged 23 commits into from
Nov 2, 2023
Merged

logs on demand #455

merged 23 commits into from
Nov 2, 2023

Conversation

dbraquart
Copy link
Contributor

@dbraquart dbraquart commented Oct 9, 2023

This PR works only with branch logs_optimization from report-server (no PR at this time)

@EstherDarkish EstherDarkish self-requested a review October 18, 2023 12:28
Signed-off-by: David BRAQUART <[email protected]>
Signed-off-by: David BRAQUART <[email protected]>
Signed-off-by: David BRAQUART <[email protected]>
@dbraquart dbraquart changed the title Wip logs on demand logs on demand Oct 19, 2023
dbraquart and others added 4 commits October 23, 2023 10:14
@dbraquart dbraquart requested a review from SlimaneAmar October 26, 2023 09:30
.addHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
.setBody(mapper.writeValueAsString(getNodeReport(Objects.requireNonNull(request.getRequestUrl()).pathSegments().get(2), request.getRequestUrl().queryParameter(QUERY_PARAM_REPORT_DEFAULT_NAME)).getSubReporters()))
.addHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
} else if (path.matches("/v1/subreports/.*\\?severityLevels=.*")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth it to include & in these patterns, in case we have something like /v1/reports/1234?hello=true&defaultName ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont get this comment

Copy link
Contributor

Choose a reason for hiding this comment

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

The current regex will only match if severityLevels is the first parameter in the URL. If it is the second, then it would match "&severityLevel=" instead of "?severityLevel="

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I get it.
But we have only one param currently, so severityLevels is always first.

SlimaneAmar and others added 2 commits October 31, 2023 15:41
Signed-off-by: David BRAQUART <[email protected]>
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

83.7% 83.7% Coverage
0.0% 0.0% Duplication

@dbraquart dbraquart merged commit fa26b6a into main Nov 2, 2023
4 checks passed
@dbraquart dbraquart deleted the wip_logs_on_demand branch November 2, 2023 13:40
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.

3 participants