-
Notifications
You must be signed in to change notification settings - Fork 100
Remotely configure NGINX Agent log level and path #1382
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
==========================================
- Coverage 86.35% 85.99% -0.37%
==========================================
Files 102 102
Lines 12510 12764 +254
==========================================
+ Hits 10803 10976 +173
- Misses 1230 1306 +76
- Partials 477 482 +5
... and 9 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)