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 custom integration block list #112481

Merged
merged 7 commits into from
Mar 6, 2024
Merged

Conversation

emontnemery
Copy link
Contributor

@emontnemery emontnemery commented Mar 6, 2024

Proposed change

Add custom integration block list

The block list is a dictionary where the key is the integration domain and the values have a reason why the integration is blocked, as well as the lowest version which is not blocked.

Background in #112464

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:

@emontnemery emontnemery requested a review from a team as a code owner March 6, 2024 08:10
@home-assistant home-assistant bot added cla-signed core small-pr PRs with less than 30 lines. labels Mar 6, 2024
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Just add a test.

@MartinHjelmare MartinHjelmare marked this pull request as draft March 6, 2024 09:10
@emontnemery emontnemery marked this pull request as ready for review March 6, 2024 09:59
@frenck frenck added this to the 2024.3.0 milestone Mar 6, 2024
Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

2024-03-06 00:49:59.608 WARNING (SyncWorker_15) [homeassistant.loader] We found a custom integration start_time which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-03-06 00:49:59.608 ERROR (SyncWorker_15) [homeassistant.loader] Version 1.1.6 of custom integration 'start_time' breaks Home Assistant and was blocked from loading, please create a bug report at https://github.com/AlexxIT/StartTime/issues

👍
Nice!

@cdce8p
Copy link
Member

cdce8p commented Mar 6, 2024

Should we provide a way to overwrite this? Especially if lowest_good_version is set to None this essentially means that users won't even be able to install a newer (fixed) version until our mapping has been updated and they update their Home Assistant version.

It might also make testing blocked integrations itself to provide a fix more difficult without it.

--
The safe alternative of course would be to specify the last know bad version with the drawback that even newer ones might be broken.

@emontnemery
Copy link
Contributor Author

@cdce8p there are a thousand ways to overcome the block list, users can manually change the version in the manifest, rename the integration, make a custom integration which clears the block list etc. etc., I don't think we also need to provide some official way.

@cdce8p
Copy link
Member

cdce8p commented Mar 6, 2024

@cdce8p there are a thousand ways to overcome the block list, users can manually change the version in the manifest, rename the integration, make a custom integration which clears the block list etc. etc., I don't think we also need to provide some official way.

At least changing the version won't work if lowest_good_version is set to None but renaming is still an option.

@emontnemery emontnemery merged commit 807c3ca into dev Mar 6, 2024
53 checks passed
@emontnemery emontnemery deleted the custom_integration_block_list branch March 6, 2024 12:56
frenck pushed a commit that referenced this pull request Mar 6, 2024
* Add custom integration block list

* Fix typo

* Add version condition

* Add block reason, simplify blocked versions, add tests

* Change logic for OK versions

* Add link to custom integration's issue tracker

* Add missing file

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants