Skip to content

Bump aioraven to 0.5.2#113714

Merged
joostlek merged 1 commit into
home-assistant:devfrom
cottsay:aioraven-0.5.2
Mar 20, 2024
Merged

Bump aioraven to 0.5.2#113714
joostlek merged 1 commit into
home-assistant:devfrom
cottsay:aioraven-0.5.2

Conversation

@cottsay
Copy link
Copy Markdown
Contributor

@cottsay cottsay commented Mar 18, 2024

Proposed change

Bump aioraven to 0.5.2
Upstream diff: https://github.com/cottsay/aioraven/compare/0.5.1..0.5.2
Upstream changelog: https://github.com/cottsay/aioraven/blob/0.5.2/CHANGELOG.md#052-2024-03-17

Defer feeding XML data until we likely trigger an event

Recent changes to expat, the XML parser behind the Python XMLPullParser,
utilize a backoff when feeding the parser in small chunks which don't
(yet) constitute something interesting. Unfortunately, this could result
in the parser sitting on a completed payload waiting for more data
before it attempts parsing.

The safest mitigation I can find is to just wait until we get a '>'
before feeding the parser, which should hopefully mean that we'll never
trigger the backoff.

For my personal use I have Home Assistant Core deployed directly to a server. Under those conditions I was never able to trigger this issue. However, an under-provisioned Home Assistant OS VM seems to occasionally break what is normally a single serial read operation into chunks of size 8. These conditions exposed the misbehavior when combined with the recent changes to the expat parser.

While this isn't directly a fix for #113473, it should address more of the data gaps reported there.

I'd like this fix to be considered for inclusion in the next 2024.3 patch release.

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:

@home-assistant home-assistant Bot added cla-signed dependency Pull requests marked as a dependency upgrade integration: rainforest_raven small-pr PRs with less than 30 lines. by-code-owner Quality Scale: No score labels Mar 18, 2024
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Mar 18, 2024
@TheJulianJES TheJulianJES added this to the 2024.3.2 milestone Mar 19, 2024
@joostlek joostlek merged commit 6552e12 into home-assistant:dev Mar 20, 2024
@cottsay cottsay deleted the aioraven-0.5.2 branch March 20, 2024 11:47
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cherry-picked cla-signed dependency Pull requests marked as a dependency upgrade integration: rainforest_raven Quality Scale: No score small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants