Skip to content

grpc: add coments about updating related python packages for compatibility#349050

Merged
Aleksanaa merged 9 commits intoNixOS:masterfrom
rorosen:grpcio-update-comment
Oct 30, 2024
Merged

grpc: add coments about updating related python packages for compatibility#349050
Aleksanaa merged 9 commits intoNixOS:masterfrom
rorosen:grpcio-update-comment

Conversation

@rorosen
Copy link
Contributor

@rorosen rorosen commented Oct 16, 2024

grpc should always be updated together with related python packages to ensure compatibility. Mismatched versions have led to incompatibilities in the past: #338875

Things done

  • Extend the comment about related python packages
  • Disable auto updates for grpc and related python packages
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@rorosen rorosen requested a review from matdibu October 16, 2024 14:28
@matdibu
Copy link
Contributor

matdibu commented Oct 16, 2024

thank you!

@rorosen rorosen mentioned this pull request Oct 16, 2024
13 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 16, 2024
@scraptux
Copy link
Contributor

I would suggest, actually upgrading all grpc python packages at once.

So the additional packages not mentioned in the comment (including your commit) would be:

  • pythonPackages.grpcio-testing
  • pythonPackages.grpcio-channelz
  • pythonPackages.grpcio-reflection
  • pythonPackages.grpcio-health-checking

Its probably also a good idea to add 'noupdate' to these packages so that r-ryantm doesn't update them individually.

@scraptux scraptux self-requested a review October 16, 2024 16:24
@rorosen rorosen force-pushed the grpcio-update-comment branch from edb28e8 to cea6d6a Compare October 16, 2024 17:03
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Oct 16, 2024
@rorosen
Copy link
Contributor Author

rorosen commented Oct 16, 2024

I would suggest, actually upgrading all grpc python packages at once.

Sounds like a wise thing to do. I added the python packages you mentioned to the comment and disabled auto updates for them as well as the main grpc package. Looking at the logs, r-ryantm cannot update it ultimately anyway (e.g. here).

Copy link
Contributor

@scraptux scraptux left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for making the changes!

@rorosen rorosen force-pushed the grpcio-update-comment branch from 8af74a0 to 81eef3a Compare October 16, 2024 19:44
@rorosen
Copy link
Contributor Author

rorosen commented Oct 16, 2024

I decided to add a test that checks whether the related python packages have the same version as grpc. The test will fail with an error message, if any version doesn't match

error: builder for '/nix/store/qcwpwsk0arvszv23b9yg72b5kzv7gil8-check-grpc-versions.drv' failed with exit code 1;
       last 2 log lines:
       > Version of package python3.12-grpcio-1.64.1 does not match this grpc version (1.66.1)
       > Please ensure that all related packages have the same version
       For full logs, run 'nix log /nix/store/qcwpwsk0arvszv23b9yg72b5kzv7gil8-check-grpc-versions.drv'.

The test will obviously fail currently, but should pass once all packages have the same version and will help to prevent incompatibilities in the future. I don't feel to good about merging a failing test but I think it makes sense in this context. Let me know if you have concerns.

@rorosen rorosen changed the title grpc: add comment about updating pythonPackages.grpcio grpc: add test to verify related python packages have the same version Oct 16, 2024
@scraptux
Copy link
Contributor

The test will obviously fail currently, but should pass once all packages have the same version and will help to prevent incompatibilities in the future. I don't feel to good about merging a failing test but I think it makes sense in this context. Let me know if you have concerns.

Great idea! I believe merging now should not be a problem. Since the latest version is 1.66.2 now anyways, I think we should create a PR updating all packages once this one is merged.

@ofborg ofborg bot requested review from LnL7 and fabaff October 16, 2024 22:07
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Oct 16, 2024
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. labels Oct 25, 2024
@rorosen rorosen changed the base branch from staging to master October 25, 2024 10:28
@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. labels Oct 25, 2024
@rorosen rorosen marked this pull request as ready for review October 25, 2024 10:33
@rorosen
Copy link
Contributor Author

rorosen commented Oct 25, 2024

Did you consider perhaps having more of a "functional" test

I agree that functional tests should be the desired solution, however, I am not familiar at all with the python grpc stuff and adding the tests out of the initial scope of this PR, which was just adding the comments. I crated a separate issue that can help in tracking the progress of compatibility tests: #351132

@ofborg ofborg bot added 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels Oct 25, 2024
The grpc package should be updated together to with all related python
packages to ensure compatibility.
@rorosen rorosen force-pushed the grpcio-update-comment branch from 4cd0828 to 0d7cb82 Compare October 25, 2024 13:32
@scraptux
Copy link
Contributor

PR title needs to be adjusted, looks good otherwise!

@rorosen rorosen changed the title grpc: add test to verify related python packages have the same version grpc: add coments about updating related python packages for compatibility Oct 28, 2024
@wegank wegank added the 12.approvals: 3+ This PR was reviewed and approved by three or more persons. label Oct 28, 2024
@Aleksanaa Aleksanaa merged commit cb8162b into NixOS:master Oct 30, 2024
@rorosen rorosen deleted the grpcio-update-comment branch October 30, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants