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
Added: reload server config by sending it a message #4307
Conversation
Just as a heads up, CI build phase is red because of Looks like the right direction for sure, not sure what makes sense for a return value here. Maybe Derek has an opinion. Can you please extend the test to also check that a non-system account can't hit this? |
I will take a look this weekend. Definitely get your editor setup to auto run go-fmt on save for sure. |
oops about |
Should return the error of reload to the caller. |
@derekcollison it's |
@neilalexander I added a test to ensure that a regular user can not reload. The failure is kinda silent ( |
98612b7
to
a076ecf
Compare
@derekcollison @neilalexander what should I do for documenting this? |
@levb I will handle documentation and ask questions if I have any. Also, in case there are more changes coming.. if you rebase against main then you will only have the PR Travis build now 😄 |
gofmt PR feedback: test that a regular account can not reload PR feedback: set response.Data to nil on success
6c0671d
to
46a3892
Compare
The consistent test failures were (both) caused by test data mismatches; fixed now. It still took a few runs to turn green, but now no consistent failures, so I think I got them all. |
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.
LGTM - One minor question
server/events.go
Outdated
// Listen for requests to reload the server configuration. | ||
subject = fmt.Sprintf(serverReloadReqSubj, s.info.ID) | ||
if _, err := s.sysSubscribe(subject, s.noInlineCallback(s.reloadConfig)); err != nil { | ||
s.Errorf("Error setting up internal tracking: %v", err) |
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.
I think this error log can probably be improved, I dont think internal tracking
will tell people what this is about.
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.
@ripienaar thx for catching the incomplete cut&paste, improved the message.
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.
LGTM
Resolves #NNN
git pull --rebase origin main
)Resolves #
Changes proposed in this pull request:
$SYS.REQ.SERVER.{server-id}.RELOAD