Skip to content

Migrate device connections to a normalized form #140383

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

Conversation

arturpragacz
Copy link
Contributor

@arturpragacz arturpragacz commented Mar 11, 2025

Proposed change

Migrate device connections to a normalized form.

We want to ensure that all the device connections in the registry are in a normalized form.
Unfortunately we didn't guarantee that in the past.

All the paths through which connections are provided by integrations now ensure that the connections are normalized. The last one that didn't guarantee it, I removed in #134100.

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 #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend 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.

To help with the load of incoming pull requests:

Copy link
Member

@abmantis abmantis left a comment

Choose a reason for hiding this comment

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

Can you add some context on the PR description to what this is fixing/why is it needed?

@MartinHjelmare MartinHjelmare marked this pull request as draft March 11, 2025 23:39
@arturpragacz arturpragacz marked this pull request as ready for review March 15, 2025 07:44
@emontnemery emontnemery marked this pull request as draft March 27, 2025 08:48
@arturpragacz arturpragacz marked this pull request as ready for review March 27, 2025 18:45
@arturpragacz arturpragacz requested a review from emontnemery April 9, 2025 15:24
Copy link

github-actions bot commented Jun 9, 2025

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes.
Thank you for your contribution!

@github-actions github-actions bot added the stale label Jun 9, 2025
@arturpragacz
Copy link
Contributor Author

Not stale

@github-actions github-actions bot removed the stale label Jun 10, 2025
@emontnemery
Copy link
Contributor

I want to take another look at this to triple confirm it doesn't risk breaking anything, including downgrade. I'll try to get to that during next week.

@emontnemery emontnemery marked this pull request as draft June 11, 2025 09:32
@emontnemery emontnemery marked this pull request as ready for review June 26, 2025 10:06
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

I think this looks good, thanks @arturpragacz and sorry about the slow review 👍

Maybe we should guard against accidentally breaking in the future by validating DeviceEntry.connections though.

@arturpragacz arturpragacz force-pushed the helpers/normalize-device-connections-migration branch from eb9f2c8 to 68e191e Compare June 26, 2025 10:59
@arturpragacz arturpragacz force-pushed the helpers/normalize-device-connections-migration branch from 68e191e to 65961f7 Compare June 26, 2025 11:02
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

Thanks, @arturpragacz 👍

@emontnemery emontnemery merged commit 40f553a into home-assistant:dev Jun 26, 2025
48 checks passed
@arturpragacz arturpragacz deleted the helpers/normalize-device-connections-migration branch June 26, 2025 14:39
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 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.

3 participants