-
Notifications
You must be signed in to change notification settings - Fork 17
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
Discussion: keep midea_ac_lan
or rename to midea_lan
#68
Comments
Is it possible to migrate user data to a new domain? |
I think it should be possible:
also did some grep check: # cd /config
config # grep -rl "midea_ac_lan" .
./home-assistant_v2.db
./configuration.yaml
./home-assistant.log
./.storage/core.entity_registry
./.storage/core.restore_state
./.storage/core.config_entries
./.storage/core.device_registry
./.storage/hacs.repositories
./.storage/core.logger
./.storage/hacs.data
./custom_components/hacs/utils/default.repositories
./custom_components/midea_ac_lan/manifest.json
./custom_components/midea_ac_lan/const.py
./home-assistant.log.1
config # |
You mean modifying these files manually? |
|
for 2. maybe not possible. For example, I did not use |
I think we should rename only when ready to merge core. Thats due to brand repo require of images. Othetwise the integration will miss images. |
Add brand image is easy. I think the main question is whether we should consider migrating user data and whether we can easily complete the migration. |
directly rename and commit to core will cause all the old domain users lost the devices, configs and old history. |
oh, for Q2, like home assistant, it don't care about db type, we can use sqlite/postgresql, only the connection type/mode/args diff in configs, finally, it will using the same SQL syntax and same table name to store our data to different DB, sqlite3 can be the default option. for Q3, domain name changed, there is no any impact for saved devices and device entries, this is what we should do in config_flow.py, as code controlled in our midea_ac_lan or midea_lan custom integration, we should process it with right during config steps, once config finished,old devices should works well in new format. |
So, what does a typical migration process look like? |
I'm checking if there is a helper to migrate domain for an integration. |
To spice it up a little. On core we might need to create pseudo integrations for other brands, so when the user search brand "Midea" or "Electrolux", they will receive the correct result. |
BTW, we should enable discussions on the repo instead of using issues ;-) |
We have a nearly ready PR , #159, that will migrate all 3 categories:
so keep all historical data. I think we are quite ready to rename this repo and hopefully merge the PR right after ( |
Idon't test it now, but before I want to test it, seems I found there is some more issue:
After reboot: so, we should have both domain to work at the same time to finish the migrate:
anyway current migrate solution may not work as our expected. in addition, for migrate configs, #86 should works well, you can check with it for reference, #86 |
I've tried to show that this approach has issues without success. With this approach, to be able to migrate the user will have many needed interventions, and those could cause system disruption. I believe that the migration repair should be in the midea_lan integration and not on midea_ac_lan. So, when the user installs midea_lan, the user will be prompted to migrate the configs from midea_ac_lan. After this, the midea_ac_lan will be useless. That should be inside the core integration, forcing only one migration of the user configs. |
thanks @rokam for your suggestion. use new domain to check old entries/devices should ok, both solution should select one:
if we use solution 1: new domain will be clean and old domain will used as a bridge to finish the migrate job, it should be safe, as migrate can be finish it old domian, we can continue improve it with new domain changes, both migrate action and new action is split. but I'm not sure whether it can works, just a idea. if we use solution 2: it should be easy and user can got prompt , to confirm migrate the configs/entries/device to current new domain, and how long we will keep this migrate jobs in new domain ? we should accept it and have a plan for it. @rokam @Necroneco any suggestion and idea ? once we confirmed the solution, test pass with the basic process, we can add document/operation process to user in old domain repo and new domain repo. |
For solution 1 and 2 we need to maintain the migration process. If we change something in the new domain it should be changed in the old one. |
agree, we should stop migrate support in a specific momment. solution 1 will keep new domain is clean and without any migrate jobs, all the migrate jobs keeps in old domain. it don't impact our future plan, for example, try to commit it to HA core. |
我之前一直用的原开发者的那个集成,最近发现了这个 ,而且原项目好久没更新了。可是我在HACS里一搜就是原项目,不知道怎么可以保留原来集成中添加的设备信息的前提下改到这里面 |
I have been using the integration from the original developer, but I recently discovered this, and the original project has not been updated for a long time. But when I searched in HACS, I found the original project. I don’t know how I can change it here while retaining the device information added in the original integration. |
删除旧的即可,然后参考首页readme安装就行,原有设备应该可以直接用 |
Just delete the old one, and then refer to the homepage readme to install it. The original device should be able to be used directly. |
Device type and model (or SN)
none
The description of new feature
Hi friends
@rokam @chemelli74 @Necroneco @Qianli-Ma
After some consideration, I think we should discuss with this naming issue at early.
First of all, when we started to maintain
midea_ac_lan
repo, we were unsure who would help us with this forked repo. We just wanted to fix some bugs and try to continue improve it. Fortunately, we have many members contributing code to this repo now, really thanks for all of us.I know we still have a lot of mypy/pylint/unit test/code coverage issues that need to be improved,
based on our plan and future goal: to integrate with Home Assistant core and rename to
midea_lan
when we commit to core, so we should consider the naming issue at early.As @rokam mentioned in the Discord group,
midea_ac_lan
also is no only for AC now. it should be rename tomidea_lan
and using new name for us in future.There is more issue with current forked repo:
georgezhao2010/midea_ac_lan
, we need to manual select itmidea_lan
, we need migrate oldmidea_ac_lan
domain user data tomidea_lan
doamin, if we do it later, we may lost more repo contributors/commit history.@rokam has finished deattach the core device lib to midea-local repo with pip package, any suggestion and comments?
I'm really sorry for these inconveniences with current forked repo, we should have a plan for it.
Solution 1: rename to
midea_lan
with a new repotry to migrate old
midea_ac_lan
domain user data to newmidea_lan
doamin, then migrate to newmidea_lan
repo. we should do it at early, if we directly going to core with midea_lan, we may miss more user data and cause incompatibilities, we should finish most of the migration before we commit, using two domains in HA core may not be approve in code review.Solution 2: do nothing, continue using
midea_ac_lan
in future and always using fork repo mode, no any changes.Solution 3: continue using
midea_ac_lan
, but remove current repo and reinit it with latest codes, manual save issue/bug list for future track, PR/commit history/repo star will be miss, start a new repo without fork mode for future.most of us did so many contributing to current
midea_ac_lan
repo and our future goal, so please add your comments and suggestion with this naming issue, then we can know where we will go in future.not use Discord and just using GitHub Issue to discuss it, as most of us not in same timezone, it's a most important changes for us and future plan.
Thanks
The text was updated successfully, but these errors were encountered: