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

Warn for old slugs/entity ids #20478

Merged
merged 6 commits into from Jan 26, 2019

Conversation

Projects
None yet
5 participants
@balloob
Copy link
Member

balloob commented Jan 26, 2019

Description:

Undo the breaking changes of 0.86. No more core breaking changes like that.

This will warn users that have invalid Entity IDs or slugs and creates a notification.

Log messages:

  • 2019-01-26 10:13:40 WARNING (MainThread) [homeassistant.helpers.config_validation] Found invalid entity_id yolo.beer__beer, please update with yolo.beer_beer. This will become a breaking change.
  • 2019-01-26 10:13:40 WARNING (MainThread) [homeassistant.helpers.config_validation] Found invalid slug incorrect__, please update with incorrect. Thiswill be come a breaking change.

Notification:
image

CC @pvizeli @kellerza

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from home-assistant/core as a code owner Jan 26, 2019

@wafflebot wafflebot bot added the in progress label Jan 26, 2019

Show resolved Hide resolved homeassistant/helpers/config_validation.py Outdated
Show resolved Hide resolved homeassistant/helpers/config_validation.py Outdated
Show resolved Hide resolved homeassistant/bootstrap.py Outdated

@balloob balloob modified the milestones: 0.86.2, 0.86.3 Jan 26, 2019

balloob added some commits Jan 26, 2019

"This will become a breaking change."
)
msg.append('\n'.join('- {} -> {}'.format(*item)
for item in cv.INVALID_ENTITY_IDS_FOUND.items()))

This comment has been minimized.

@houndci-bot

houndci-bot Jan 26, 2019

line too long (82 > 79 characters)

@kellerza
Copy link
Member

kellerza left a comment

I have a feeling that valid_entity_id, might also be called from something other that config_validation (it is in core.py after all)

It was changed from a regex to the strict slugify method, this could still cause issues if used directly

@balloob

This comment has been minimized.

Copy link
Member Author

balloob commented Jan 26, 2019

Sure, it's not perfect. What I am trying to avoid mainly now is group component not being set up, taking the rest of the components that rely on it down.

@balloob balloob merged commit 87316c4 into dev Jan 26, 2019

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA

@wafflebot wafflebot bot removed the in progress label Jan 26, 2019

@delete-merged-branch delete-merged-branch bot deleted the warn-old-slugs-entity-ids branch Jan 26, 2019

balloob added a commit that referenced this pull request Jan 26, 2019

Warn for old slugs/entity ids (#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint

@balloob balloob referenced this pull request Jan 26, 2019

Merged

0.86.3 #20485

@rohankapoorcom rohankapoorcom referenced this pull request Jan 27, 2019

Merged

Fix linting error #20488

4 of 4 tasks complete

mxworm added a commit to mxworm/home-assistant that referenced this pull request Jan 27, 2019

Warn for old slugs/entity ids (home-assistant#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint

fredrike added a commit to fredrike/home-assistant that referenced this pull request Jan 30, 2019

Warn for old slugs/entity ids (home-assistant#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment