core icon indicating copy to clipboard operation
core copied to clipboard

Guard ConfigEntry from being mutated externally without using the built-in interfaces

Open bdraco opened this issue 4 months ago • 1 comments

needs https://github.com/home-assistant/core/pull/110018

Proposed change

Guard ConfigEntry from being mutated externally without using the built-in interfaces

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:

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:

bdraco avatar Feb 08 '24 15:02 bdraco

This is going to blow up for sure since I think we have tests doing this.

bdraco avatar Feb 08 '24 15:02 bdraco

Once the deprecation period is over, we should also remove the automatic save when async_migrate_entry returns True

emontnemery avatar Feb 09 '24 09:02 emontnemery

WARNING:homeassistant.helpers.frame:Detected that integration 'airvisual' sets version directly to update a config entry. This is deprecated and will stop working in Home Assistant 2024.10, it should be updated to use async_update_entry instead at homeassistant/components/airvisual/__init__.py, line 382: entry.version = version, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+airvisual%22

bdraco avatar Feb 10 '24 15:02 bdraco

🤞 I think I got most or all of them

bdraco avatar Feb 12 '24 20:02 bdraco

Hopefully it passes this time

bdraco avatar Feb 12 '24 21:02 bdraco

I think https://github.com/home-assistant/core/pull/110423 is the only one left and this one should be good to go once I do a blog post

bdraco avatar Feb 13 '24 04:02 bdraco

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Feb 16 '24 14:02 home-assistant[bot]

Thanks for the tweaks & review!

bdraco avatar Feb 16 '24 14:02 bdraco