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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge recorder database at night #33646

Merged
merged 2 commits into from Apr 16, 2020

Conversation

amelchio
Copy link
Contributor

@amelchio amelchio commented Apr 4, 2020

Breaking change

  • The recorder configuration purge_interval has been deprecated. The recorder database is now purged every night. This can be disabled with the new auto_purge configuration though that is usually not recommended.

Proposed change

This updates the recorder purge schedule as discussed in home-assistant/architecture#358.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
recorder:
    auto_purge: false

Additional information

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
  • The code has been formatted using Black (black --fast 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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

@bdraco
Copy link
Member

bdraco commented Apr 4, 2020

4:12 is a great choice. 馃憤 Should we document this?

@amelchio
Copy link
Contributor Author

amelchio commented Apr 5, 2020

I couldn't quite decide that. I kept it out of the documentation for now to give us some leeway for tweaks but I will go with whatever people want.

@BudBundi

This comment has been minimized.

@pvizeli
Copy link
Member

pvizeli commented Apr 6, 2020

@BudBundi use auto_purge: false and create ou own purge automation.

@bdraco
Copy link
Member

bdraco commented Apr 6, 2020

@amelchio I put some suggested language in the docs PR.

@amelchio amelchio requested a review from balloob April 16, 2020 12:04
): cv.positive_int,
}
vol.Optional(DOMAIN, default=dict): vol.All(
cv.deprecated(CONF_PURGE_INTERVAL, invalidation_version="0.111.0"),
Copy link
Member

Choose a reason for hiding this comment

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

Let's drop the invalidation_version. Let it be a warning and we can drop it at some point in the future. No reason to break things if we can keep it as a warning and it's not impacting operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thank you for reviewing!

Dev automation moved this from Needs review to Reviewer approved Apr 16, 2020
@balloob balloob merged commit 6e2cf96 into home-assistant:dev Apr 16, 2020
Dev automation moved this from Reviewer approved to Done Apr 16, 2020
@MartinHjelmare
Copy link
Member

Should we label this a breaking change?

@amelchio
Copy link
Contributor Author

Yeah, sorry. I put the text in but I always forget about the label 馃檮

@lock lock bot locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

Recorder purge schedule
7 participants