Feature Request: Run migration and stop
- Dominant language
- Elm
- Stars
- 1.3k
- Forks
- 72
- Avg merge
- 21h 30m
- Merged PRs (30d)
- 1
Description
Thanks for your great work on Sharry! I found it handy enough that I made it into a [Home Assistant addon](https://github.com/mdegat01/addon-sharry) to make it easy for users of that system to install it.
I noticed in 1.11.0 you added support for storing files on the filesystem. Which is great I was hoping to make the addon self-contained instead of having it depend on having another service running. However the current setup around migration makes it a bit tricky to switch over. I was hoping to do a one-time migration and then drop the database file store entirely. But it looks like the way to do a migration is to literally stop and start full sharry with different files stores enabled and change `copy-files` in between.
Could you consider a config option like "stop after migration" that simply stops immediately after migration has completed? Preferably with the status code set based on whether migration succeeded or not so error handling is possible? ~~Or even better a CLI flag when starting Sharry like `--copy-files=database:filesystem` so that part doesn't actually need to go into the config and then get removed/changed?~~
EDIT: Oh right, there already is a CLI flag since java properties work with HOCON. So in that case a config option to stop after migration with a status code would be great.
Contributor guide
Research direction
Start at Sharry’s startup and migration entry points, then trace the existing `copy-files` configuration and Java-property CLI override. Determine where migration success or failure is known and verify that a stop-after-migration option can exit with the corresponding status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend, cli, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100