-
Notifications
You must be signed in to change notification settings - Fork 1
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
[WIP] Update configuration from Manager server #118
Conversation
179fb76
to
359e89a
Compare
d4e303c
to
ab935b0
Compare
ab935b0
to
29f5584
Compare
29f5584
to
0a12183
Compare
CHANGELOG.md
Outdated
### Added | ||
|
||
- Added `update_config` request handler. | ||
|
||
### Removed | ||
|
||
- Removed `reload_config` request handler. |
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 these should be combined into one item in the Changed
section.
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.
Applied the suggested adjustment.
0a12183
to
582f786
Compare
async fn reload_config(&mut self) -> Result<(), String> { | ||
info!("start reloading configuration"); | ||
async fn update_config(&mut self) -> Result<(), String> { | ||
info!("Updating configuration"); |
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.
@sophie-cluml and @danbi2990,
Does calling this method guarantee that the update process will start? If not, we need to clarify that this method only attempts or plans to update the configuration.
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.
Sophie and I discussed that the update process will be implemented in the next issue.
The next issue will proceed after the same functionality is completed for the Semi-supervised Engine.
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 don't get what you said. Is this going to wait for the next issue being completed? Or, this message will be handled later?
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.
The latter is right. It will be handled later because it needs to fetch the configuration from the manager server.
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.
If this PR is temporarily being halted, it would be better to mention it to let others know of it.
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.
The original plan was to merge this PR first and then implement the next issue.
I thought it was fine because this PR only changes the method name while maintaining the same behavior as before.
However, as you suggested, it seems reasonable to wait until the next issue is completed. For now, I will mark this PR as [WIP]. Thank you!
582f786
to
4aaa286
Compare
Since the linked issue of this PR, is handled by #131, let me close this PR. (cc. @danbi2990 When we manually close PR, we close it with a comment that describes why. This process is guided in our rule.) |
Replace
reload_config
withupdate_config
.Close: #112
In this version, the `update_config` is effectively dead code (non-functional) because:- if a local config is provided, the updated config is ignored by policy.
- if no local config is provided, the program cannot run normally due to the absence of
- If no local config is provided, retrieve the config from the Manager server.
- If all attempts fail, the program will enter minimal mode.
-
-
last_timestamp_data
.As discussed, this will be addressed in a separate issue as follows:
About code details
There are code patterns like
writer.lock().unwrap_or_else(std::sync::PoisonError::into_inner)
which ignore the
PoisonError
, assuming that the log writer should not cause apanic even if another thread has poisoned the lock.
If
log_dir
changes by updating config, logs should be saved in thatdirectory. This commit implements this by wrapping the file writer.
Alternatively,
tracing_subscriber::reload
could be used, but it cannothandle cases where the directory is added or removed (as it requires
reassigning the writer itself, which is not possible due to internal
limitations).
Related issue: Panic after reloading layer, combined with
.with_filter
tokio-rs/tracing#1629