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

Fix reauth in Overkiz for config entries created prior to 2022.12 #106251

Merged
merged 2 commits into from Feb 20, 2024

Conversation

iMicknl
Copy link
Contributor

@iMicknl iMicknl commented Dec 22, 2023

Proposed change

For the local API, we first had a ConfigFlow migration, however due to feedback we removed the migration and added the value as optional and retrieve it via .get(). We forgot to do the same in the AuthFlow..

Fixes #106204

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

  • This PR fixes or closes issue: fixes Failed to Setup #106204
  • This PR is related to issue:
  • Link to documentation pull request:

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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @vlebourl, @tetienne, @nyroDev, mind taking a look at this pull request as it has been labeled with an integration (overkiz) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of overkiz 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 overkiz 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.

@jbouwh
Copy link
Contributor

jbouwh commented Dec 22, 2023

Should we update legacy config entries? May be add a test?

@iMicknl
Copy link
Contributor Author

iMicknl commented Dec 22, 2023

Should we update legacy config entries? May be add a test?

Based on feedback on my previous PR, I removed the migration because it could be solved by providing a default value when the key is missing. There were more keys that were renamed, but they kept the original name in the end, to make it easier for people to rollback to a previous version.
For this one I could technically add a migration, and it wouldn't cause any issues for a roll-back, but wouldn't that be overkill?

I can add a migration and simplify the getters, or add test :).

@jbouwh
Copy link
Contributor

jbouwh commented Dec 22, 2023

I can add a migration and simplify the getters, or add test :)

Simplifying is okay. A test with a legacy entry too. You can add a remark to remember when it can be removed.

@iMicknl
Copy link
Contributor Author

iMicknl commented Feb 20, 2024

@jbouwh would current proposal be ok for a merge? I will put this full change (as suggested) on the backlog, but a short-term fix in the next beta would be great.

Due to time challenges, I haven't been able to spend much time on this unfortunately.

Copy link
Contributor

@jbouwh jbouwh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
Thnx @iMicknl 👍

@jbouwh jbouwh added this to the 2024.2.3 milestone Feb 20, 2024
@jbouwh jbouwh merged commit 6471397 into home-assistant:dev Feb 20, 2024
23 checks passed
@iMicknl iMicknl deleted the overkiz/fix_106204 branch February 20, 2024 13:15
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
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.

Failed to Setup
3 participants