Remotely configure NGINX Agent log level and path#1382
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
==========================================
- Coverage 86.35% 86.05% -0.31%
==========================================
Files 102 102
Lines 12510 12764 +254
==========================================
+ Hits 10803 10984 +181
- Misses 1230 1298 +68
- Partials 477 482 +5
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
internal/command/command_plugin.go
Outdated
| } | ||
| slog.InfoContext(ctx, "Received management plane action request") | ||
| cp.handleAPIActionRequest(newCtx, message) | ||
| case *mpi.ManagementPlaneRequest_UpdateNginxAgentConfigurationRequest: |
There was a problem hiding this comment.
Does Auxiliary vs Command sever matter for the agent config ?
| expected: &mpi.Log{ | ||
| LogLevel: mpi.Log_LOG_LEVEL_ERROR, | ||
| LogPath: "", | ||
| }, |
There was a problem hiding this comment.
Can there be tests where log level is greater than 3 and what if there's blank level?
There was a problem hiding this comment.
both cases are not allowed. The code won't compile if you try to do that
| expected: &mpi.Log{ | ||
| LogLevel: mpi.Log_LOG_LEVEL_DEBUG, | ||
| LogPath: "/other/path/to/agent.log", | ||
| }, |
There was a problem hiding this comment.
Can test be added for the following?
- path added but no log file
- Invalid path /test/@£$%/
- path in restricted access
There was a problem hiding this comment.
Added test cases but I put them in the logger_test.go file.
Proposed changes
Remotely configure NGINX Agent log level and path.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)