Changed /logs controller implementation to allow buffered logs processing instead of one entry at a time.
Moved source info handling to the frontend code.
Changes
Right now the controller accepts a "application/json" content of a list of log entries.
Tests have been adjusted, since the implementation is pretty simple I edited the existing tests without separating controller and service tests since it wouldn't add value.
Moved logging related code to a new package logging.
Removed source extra key handling from the backend code and moved to the frontend code, refactoring the ILogger interface and implementation to allow the passing of the new parameter (as optional).
How Has This Been Tested?
manually
unit tests run on my local machine
e2e tests run on my local machine
References
PR Quality Checklist
[x] I added tests to new or existing code
[ ] I removed hardcoded strings and used our i18n solution instead (see here)
[x] I made sure no sensitive info gets logged at any time in the codebase (see here) (e.g. no user info or details, no stacktraces, etc.)
[ ] I checked that infrastructure/update_infrastructure.sh runs without any error
[x] I checked that npm run build builds without any error
[x] I checked that clusters are listed correctly
[ ] I checked that a new cluster can be created (config is produced and dry run passes)
[ ] I checked that login and logout work as expected
Description
Changed
/logs
controller implementation to allow buffered logs processing instead of one entry at a time. Movedsource
info handling to the frontend code.Changes
Right now the controller accepts a
"application/json"
content of a list of log entries. Tests have been adjusted, since the implementation is pretty simple I edited the existing tests without separating controller and service tests since it wouldn't add value. Moved logging related code to a new packagelogging
. Removedsource
extra key handling from the backend code and moved to the frontend code, refactoring the ILogger interface and implementation to allow the passing of the new parameter (as optional).How Has This Been Tested?
References
PR Quality Checklist
i18n
solution instead (see here)npm run build
builds without any errorIn order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.