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

[BOUNTY - $100] Support changing manual configuration while running #380

Open
AlexCheema opened this issue Oct 23, 2024 · 4 comments
Open

Comments

@AlexCheema
Copy link
Contributor

AlexCheema commented Oct 23, 2024

#368 + #381 added support for manual configuration but if you update the configuration file while exo is running it won't update.
This should be a simple fix, hence $100 bounty.

@AranavMahalpure
Copy link

Hi @AlexCheema,

I’d like to help with this issue. I have a solution to enable dynamic configuration updates while the application (exo) is running, using a hot-reload approach to detect and apply changes in the configuration file.
Could you confirm if this approach aligns with your expectations? I’d also like to ask about the bounty requirements to ensure I’m meeting them fully. Would demonstrating this solution meet the criteria for the $100 bounty?
Thanks!

vishwamartur added a commit to vishwamartur/exo that referenced this issue Nov 12, 2024
Related to exo-explore#380

Add support for dynamic configuration updates while the application is running using a hot-reload approach.

* **ManualDiscovery (`exo/networking/manual/manual_discovery.py`)**
  - Add `start_file_watcher` method to initialize a file watcher using the `watchdog` library.
  - Add `reload_config` method to reload the network configuration dynamically.
  - Add `ConfigFileEventHandler` class to handle file modification events and trigger configuration reload.
  - Update `start` method to initialize the file watcher.
  - Update `stop` method to stop the file watcher.

* **NetworkTopology (`exo/networking/manual/network_topology_config.py`)**
  - Add `reload` method to reload the configuration from the file and update the `peers` attribute.

* **Main Application (`exo/main.py`)**
  - Import the `watchdog` library.
vishwamartur added a commit to vishwamartur/exo that referenced this issue Nov 12, 2024
Related to exo-explore#380

Add support for dynamic configuration updates while the application is running using a hot-reload approach.

* **ManualDiscovery (`exo/networking/manual/manual_discovery.py`)**
  - Add `start_file_watcher` method to initialize a file watcher using the `watchdog` library.
  - Add `reload_config` method to reload the network configuration dynamically.
  - Add `ConfigFileEventHandler` class to handle file modification events and trigger configuration reload.
  - Update `start` method to initialize the file watcher.
  - Update `stop` method to stop the file watcher.

* **NetworkTopology (`exo/networking/manual/network_topology_config.py`)**
  - Add `reload` method to reload the configuration from the file and update the `peers` attribute.

* **Main Application (`exo/main.py`)**
  - Import the `watchdog` library.

Signed-off-by: Vishwanath Martur <[email protected]>
@AlexCheema
Copy link
Contributor Author

Hi @AlexCheema,

I’d like to help with this issue. I have a solution to enable dynamic configuration updates while the application (exo) is running, using a hot-reload approach to detect and apply changes in the configuration file. Could you confirm if this approach aligns with your expectations? I’d also like to ask about the bounty requirements to ensure I’m meeting them fully. Would demonstrating this solution meet the criteria for the $100 bounty? Thanks!

Depends what you mean by hot reload.
I was thinking something super simple - periodically check every 5 secs for a configuration change.

@AranavMahalpure
Copy link

Hi @AlexCheema,

Thank you for the clarification! A periodic check every 5 seconds sounds straightforward, and I can implement that approach. I’ll set up a watcher to check the configuration file for any changes every 5 seconds and reload it if an update is detected.

Just to confirm—would this basic 5-second polling approach fulfill the bounty requirements, or is there any additional functionality you’d like me to include?

Thanks again for the guidance, and looking forward to getting started!

@AranavMahalpure
Copy link

Hi @AlexCheema,

I wanted to follow up on my last message regarding the 5-second polling approach for detecting configuration changes. I’m ready to get started on implementing this solution, but I just wanted to confirm if it fully meets the bounty requirements, or if there’s any additional functionality you’d like me to include.

Let me know if you have any further guidance or adjustments. Looking forward to moving forward with this!

Thanks again,
@AranavMahalpure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants