Skip to content

Purge recorder database at night#33646

Merged
balloob merged 2 commits intohome-assistant:devfrom
amelchio:recorder-nightly-purge
Apr 16, 2020
Merged

Purge recorder database at night#33646
balloob merged 2 commits intohome-assistant:devfrom
amelchio:recorder-nightly-purge

Conversation

@amelchio
Copy link
Copy Markdown
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
Copy Markdown
Member

bdraco commented Apr 4, 2020

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

@amelchio
Copy link
Copy Markdown
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
Copy Markdown
Member

pvizeli commented Apr 6, 2020

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

@bdraco
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

@balloob balloob merged commit 6e2cf96 into home-assistant:dev Apr 16, 2020
@MartinHjelmare
Copy link
Copy Markdown
Member

Should we label this a breaking change?

@amelchio
Copy link
Copy Markdown
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

None yet

Development

Successfully merging this pull request may close these issues.

Recorder purge schedule

7 participants