Skip to content
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

Handle transient error messages while editing config file during hot reload #2119

Open
aaronburtle opened this issue Mar 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal
Milestone

Comments

@aaronburtle
Copy link
Contributor

aaronburtle commented Mar 19, 2024

In order to hot reload we must monitor the config file for changes. This results in constant reads by the file watcher that we instantiate to do this task. However, when editing the config file, that editor will take a write-lock on the config file, resulting in the file watcher throwing errors. These errors are expected and will continue until the editor has relinquished its write lock on the config file.

Before we introduce the hot-reload feature, we must determine how we will handle these error messages.

For example, some editors will only take a write lock while saving changes made to the file. In this case, the error messaging will be limited, perhaps only a single message, and is likely to cause confusion. It might be best to ignore these limited transient errors by not recording the first small number of errors.

But it could also be the case that the editor has taken a write-lock the entire time the file is open, not just during saves. In this case a hot reload will not be possible until that editor is closed, and the error messaging will be valuable. We should maintain these error messages, perhaps by making sure we do in fact log errors beyond the first few.

Whatever the design decision, we must gracefully handle both cases so that the error messaging is consistent and clear.

Related to #2064

Related to #2108

@aaronburtle aaronburtle added the enhancement New feature or request label Mar 19, 2024
@aaronburtle aaronburtle added this to the 1.2rc milestone Mar 19, 2024
@aaronburtle aaronburtle self-assigned this Mar 19, 2024
@seantleonard seantleonard added the 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants