Skip to content

Add flag to backup store to track backup wizard completion#138368

Merged
MartinHjelmare merged 6 commits intodevfrom
backup_add_wizard_flag
Feb 24, 2025
Merged

Add flag to backup store to track backup wizard completion#138368
MartinHjelmare merged 6 commits intodevfrom
backup_add_wizard_flag

Conversation

@emontnemery
Copy link
Copy Markdown
Contributor

@emontnemery emontnemery commented Feb 12, 2025

Proposed change

Add flag to backup store to track backup wizard completion

Frontend currently checks if a password has been set to track completion of the backup wizard, unfortunately that means it's possible to create a new key, view it, print the pdf, but that key is in the end not used if the user doesn't complete the wizard.

By adding a wizard completion flag, this behavior can be fixed so a newly created password is immediately saved.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • 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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (backup) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of backup can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign backup Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

Comment thread homeassistant/components/backup/config.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

Side note: Just a general note that we should never use a parameter as input to logic for a different thing than the parameter purpose. This is classic lazy design that always comes back and hurts us.

@frenck frenck marked this pull request as draft February 19, 2025 20:57
@frenck
Copy link
Copy Markdown
Member

frenck commented Feb 19, 2025

Drafting while we are awaiting the frontend.

/CC @bramkragten

@emontnemery emontnemery marked this pull request as ready for review February 24, 2025 08:53
@emontnemery emontnemery marked this pull request as draft February 24, 2025 08:54
@emontnemery emontnemery marked this pull request as draft February 24, 2025 08:54
@bramkragten
Copy link
Copy Markdown
Member

Frontend is approved

@MartinHjelmare MartinHjelmare marked this pull request as ready for review February 24, 2025 10:42
@emontnemery
Copy link
Copy Markdown
Contributor Author

hassio tests need to be updated

@MartinHjelmare
Copy link
Copy Markdown
Member

test_config_load_config_info is failing.

@MartinHjelmare MartinHjelmare merged commit 351e594 into dev Feb 24, 2025
@MartinHjelmare MartinHjelmare deleted the backup_add_wizard_flag branch February 24, 2025 16:14
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants