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

Bump protobuf to 5.28.2 #124936

Merged
merged 15 commits into from
Sep 27, 2024
Merged

Bump protobuf to 5.28.2 #124936

merged 15 commits into from
Sep 27, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Aug 30, 2024

wheels https://github.com/home-assistant/core/actions/runs/11034634098

https://github.com/protocolbuffers/protobuf/releases/tag/v28.2 is out now so we can go to that once unblocked

Proposed change

changelog: protocolbuffers/protobuf@v25.4...v28.2

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.

To help with the load of incoming pull requests:

@home-assistant home-assistant bot added cla-signed core dependency small-pr PRs with less than 30 lines. labels Aug 30, 2024
@bdraco
Copy link
Member Author

bdraco commented Aug 30, 2024

Looks like we still need a new google-generativeai release since it pins google-ai-generativelanguage to an old version

  google-ai-generativelanguage==0.6.6, we can conclude that
  google-generativeai==0.7.2 depends on one of:

@bdraco
Copy link
Member Author

bdraco commented Sep 24, 2024

It looks like we have a new blocker

https://github.com/sdb9696/firebase-messaging/blob/main/pyproject.toml

@sdb9696 is the pin to less than 5 there because of an issue?

@sdb9696
Copy link
Contributor

sdb9696 commented Sep 25, 2024

The pin to <5 was there to ensure compatibility with the compiled python files. It seems from Q12025 compatibility will be guaranteed Major+1 so I've updated the pin to <7, recompiled against 5.28 and released a new version of the firebase-messaging library.

Running pip install ring-doorbell[listen]==0.9.5 (current version in the manifest) in a fresh installation will now install protobuf 5.28.2. Will that be sufficient or is a new ring-doorbell release required?

@bdraco
Copy link
Member Author

bdraco commented Sep 25, 2024

The pin to <5 was there to ensure compatibility with the compiled python files. It seems from Q12025 compatibility will be guaranteed Major+1 so I've updated the pin to <7, recompiled against 5.28 and released a new version of the firebase-messaging library.

Running pip install ring-doorbell[listen]==0.9.5 (current version in the manifest) in a fresh installation will now install protobuf 5.28.2. Will that be sufficient or is a new ring-doorbell release required?

I think it should be unblocked by the new release. I started the CI again

@@ -157,7 +157,7 @@

# protobuf must be in package constraints for the wheel
# builder to build binary wheels
protobuf==4.25.4
protobuf==5.28.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
protobuf==5.28.0
protobuf==5.28.2

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI if running 5.28.2 it will emit 3 UserWarnings when loading the ring integration due to this protobuf issue that has been fixed in main but not yet backported to 5.28.
I compiled against 5.28.0 and it should be fine to have runtime>compiler but not the other way round. It seems UserWarnings are directed to the logger if I understand correctly which could cause user noise?

@bdraco bdraco changed the title Bump protobuf to 5.28.0 Bump protobuf to 5.28.2 Sep 25, 2024
@bdraco
Copy link
Member Author

bdraco commented Sep 25, 2024

license check is due to #126753

@bdraco
Copy link
Member Author

bdraco commented Sep 25, 2024

verified ok with esphome, baf, cast

@bdraco bdraco marked this pull request as ready for review September 25, 2024 14:12
@bdraco bdraco requested a review from a team as a code owner September 25, 2024 14:12
@bdraco bdraco marked this pull request as draft September 25, 2024 14:57
@bdraco
Copy link
Member Author

bdraco commented Sep 25, 2024

Lets wait for 5.29 which will have this fix protocolbuffers/protobuf#18406

@cdce8p cdce8p mentioned this pull request Sep 27, 2024
19 tasks
@cdce8p
Copy link
Member

cdce8p commented Sep 27, 2024

Lets wait for 5.29 which will have this fix protocolbuffers/protobuf#18406

FYI the protobuf update will be required for the latest grpcio releases which in turn is required for Python 3.13 support.
As a stop gap, I opened #126908 so we can get grpcio to the last compatible version now and don't have an even larger jump later.

@sdb9696 Would it be possible to support protobuf 5.26.1 or 5.27.5 with firebase-messaging? The way I understand it those versions don't have the issue mentioned above. Both would unblock grpcio. Of course, we can also wait for 5.29.0, I'm just not sure when that will be released.

@cdce8p cdce8p mentioned this pull request Sep 27, 2024
19 tasks
@bdraco
Copy link
Member Author

bdraco commented Sep 27, 2024

We can merge this and not backport as it likely only affects ring and @sdb9696 already has a workaround in place

@bdraco bdraco marked this pull request as ready for review September 27, 2024 15:30
@cdce8p
Copy link
Member

cdce8p commented Sep 27, 2024

We can merge this and not backport as it likely only affects ring and @sdb9696 already has a workaround in place

I've been writing with @sdb9696 about it. He suggested that it might even be better to stay on 5.26.1 for the moment and he'll release a new compatible version of firebase-messaging soon. That's why I opened #126932 instead.

@bdraco bdraco marked this pull request as draft September 27, 2024 15:45
@sdb9696
Copy link
Contributor

sdb9696 commented Sep 27, 2024

I've been writing with @sdb9696 about it. He suggested that it might even be better to stay on 5.26.1 for the moment and he'll release a new compatible version of firebase-messaging soon. That's why I opened #126932 instead.

So I've just yanked the 5.28 releases and released a new version of firebase-messaging with the original compilations and a pin <6. Having tested it it all works with any version of the protobuf runtime and imo migrating to compilations >=5.27 will be more trouble than it's worth for anyone thinking about it in the near future.

@sdb9696
Copy link
Contributor

sdb9696 commented Sep 27, 2024

With regard to whether to bump to 5.26 or 5.28, as I don't really know what changes are there in the schema between these versions, I'd say it's probably safer to do 5.26 first just in case it affects anyone/thing else (firebase-messaging not affected either way). I guess the whole RuntimeVersion thing is an attempt by google to manage breaking changes better.

@bdraco bdraco marked this pull request as ready for review September 27, 2024 17:14
@bdraco
Copy link
Member Author

bdraco commented Sep 27, 2024

At some point we need to update anyways and there is likely no better time than at the top of the cycle so I marked this ready for review

Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

At some point we need to update anyways and there is likely no better time than at the top of the cycle so I marked this ready for review

Good point. Let's do this then. We can always revert back to 5.26.1 if we discover some issues.

@cdce8p cdce8p merged commit 8950e81 into dev Sep 27, 2024
55 checks passed
@cdce8p cdce8p deleted the protobuf_528 branch September 27, 2024 17:39
@cdce8p cdce8p mentioned this pull request Sep 27, 2024
19 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 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.

3 participants