-
Notifications
You must be signed in to change notification settings - Fork 157
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
Rainmaker doesn't stop/ deinit (MEGH-4882) #279
Comments
Would be great if someone would pick this up, its currently impossible to deinit rainmaker -- which additionally makes it pretty impossible to write unit tests too! |
@Josh-TapNoa , this has indeed been taken up and as the first step, the local control functions have been slightly changed so that it can be enabled and disabled via APIs. This would have been on GitHub already, but is stuck because of some compatibility issues with latest release/v5.1 branch if esp-idf. Rest of the stuff will also be in place soon. |
In terms of deiniting, I have been using the following patch and seems to work (although feel free to tell me how it doesnt) :) `
} Given that you can only deinit if the state is ESP_RMAKER_STATE_INIT_DONE, I just commented out that block, and now it behaves as I expect! |
This will de-initialise some components and reclaim memory, but not stop the services like mqtt, mdns, http server, etc. |
Did we ever get to end of this? Would be nice to be able to deinit the core of rainmaker to free up the mqtt, mdns and server services from running to avoid swaps during timing critical sections. |
Answers checklist.
IDF / ESP32-Arduino version.
v5.1
Operating System used.
Linux
How did you build your project?
Command line with idf.py
Development Kit.
ESP32-S2
What is the expected behavior?
Calling esp_rmaker_stop(), followed by esp_rmaker_node_deinit() stops any rainmaker processes from running.
What is the actual behavior?
Calling esp_rmaker_stop(), followed by esp_rmaker_node_deinit(), and then attempting to run esp_rmaker_node_init() results in the following error message.
This is particularly frustrating as all our production code is guarded behind a strict set of unit tests. If it's impossible to teardown and deinit rainmaker, then we can't run tests on it, which leaves our production code exposed to bugs.
Steps to reproduce.
Debug Logs.
More Information.
I'm aware this issue is mentioned here https://www.esp32.com/viewtopic.php?f=41&t=34987&p=117909, but have not seen anywhere in the repo that is tracking progress on a bug fix for this.
The text was updated successfully, but these errors were encountered: