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

Add dedicated add-on config folder #4650

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Add dedicated add-on config folder #4650

merged 3 commits into from
Oct 27, 2023

Conversation

mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Oct 25, 2023

Proposed change

Add a public config folder per addon. This way addons can make internal files for config, dbs, logs, etc. available to users but still have them backed up with the addon (unlike when these files are put into /share or /config today).

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

supervisor/addons/addon.py Outdated Show resolved Hide resolved
supervisor/docker/addon.py Show resolved Hide resolved
@agners
Copy link
Member

agners commented Oct 26, 2023

While the naming is mostly exposed to developers, I think we should be careful not mixing too many names for this feature and be as explicit as possible.

Public can be a bit misleading as it is still local only (not shared or similar), so I think I'd not use that term.

Suggestion: Generally, I'd suggest to use "add-on config folder" as term for this feature (as opposed to config folder, or Home Assistant config folder).

Since mappings are typically one per line in the conifg, length is not really an issue here. So I rather opt for verbose naming.

For the mapping names, I'd go for:

  • config (already exists): Will eventually be the deprecated config for the Home Assistant config folder
  • homeassistant_config: New mapping for the Home Assistant config folder
  • addon_config: New mapping in case the add-on wishes to have such a new add-on config folder.
  • all_addon_configs: New mapping in case the add-on wishes to have the add-on config folder of all the add-ons mapped.

@mdegat01 mdegat01 added the missing-documentation Added to pull requests that needs a docs, but none is linked label Oct 26, 2023
@mdegat01 mdegat01 requested a review from pvizeli October 26, 2023 20:54
@mdegat01 mdegat01 force-pushed the addon-config-folder branch from 88fa7ef to 28457f9 Compare October 26, 2023 20:56
@pvizeli pvizeli merged commit 0f600da into main Oct 27, 2023
22 checks passed
@pvizeli pvizeli deleted the addon-config-folder branch October 27, 2023 13:43
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2023
@agners agners changed the title Add a public config folder per addon Add dedicated add-on config Nov 2, 2023
@agners agners changed the title Add dedicated add-on config Add dedicated add-on config folder Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed missing-documentation Added to pull requests that needs a docs, but none is linked new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants