Skip to content

Pin grpcio versions in CI#2776

Merged
sentrivana merged 6 commits into
getsentry:sentry-sdk-2.0from
arr-ee:2721-pin-grpcio
Mar 5, 2024
Merged

Pin grpcio versions in CI#2776
sentrivana merged 6 commits into
getsentry:sentry-sdk-2.0from
arr-ee:2721-pin-grpcio

Conversation

@arr-ee

@arr-ee arr-ee commented Feb 29, 2024

Copy link
Copy Markdown
Contributor

From #2721 (comment)

This PR pins grpcio versions instead of grpcio-tools, as well as restructures test matrix and fixes an issue in grpc integration with grpcio < 1.40 exposed by the fixed tests.

There is an unresolved issue with grpcio-1.2x.y: grpc.aio module only got moved out of grpc.experimental in 1.32.0 (see grpc/grpc#23240). Whether it is worth supporting this case is not for me to decide :)


General Notes

Thank you for contributing to sentry-python!

Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval. Some tests (AWS Lambda) additionally require a maintainer to add a special label to run and will fail if the label is not present.

For maintainers

Sensitive test suites require maintainer review to ensure that tests do not compromise our secrets. This review must be repeated after any code revisions.

Before running sensitive test suites, please carefully check the PR. Then, apply the Trigger: tests using secrets label. The label will be removed after any code changes to enforce our policy requiring maintainers to review all code revisions before running sensitive tests.

- Force `grpcio` version instead of always using `latest`
- Bump `grpcio-tools` versions from 1.x0.0 to latest in their respective
  lines (e.g. ~=1.30.0 => ~=1.39.0) to avoid issues in early versions
- Run grpc < 1.40 on py3.9 instead of py3.10 due to compilation issues
  (e.g. cython/cython#3876 +
  cython/cython#3921 +
  grpc/grpc#28398)
@arr-ee

arr-ee commented Feb 29, 2024

Copy link
Copy Markdown
Contributor Author

Note: getting older grpcio releases to build, especially without bumping them from 1.x0.0, can be non-trivial. I ended up pre-building wheels using cibuildwheel, e.g.:

pipx install cibuildwheel
pip download --no-binary=:all: 'grpcio~=1.20;<1.30'
tar xzvf grpcio-1.29.0.tar.gz
CIBW_BUILD="cp3{7,9,10}-many*" cibuildwheel --platform linux --archs aarch64 grpcio-tools-1.29.0

This might be an issue with building wheels in CI during pip install since e.g. grpc/grpc#18950 means grpcio < 1.33.1 won't build on many modern linux distros.

@arr-ee

arr-ee commented Feb 29, 2024

Copy link
Copy Markdown
Contributor Author

CI failures are grpc.aio tests for grpcio-1.29 that I mentioned in the description; I suggest we drop this test target for now and reintroduce it in a separate issue (if at all)

@sentrivana

Copy link
Copy Markdown
Contributor

@arr-ee This is great, thanks for your work on this!

The changes look good to me. Since we're technically dropping support for some grpcio versions, I'd prefer we merge this into the sentry-sdk-2.0 branch where we're working on the 2.0 major instead of master.

@arr-ee

arr-ee commented Mar 4, 2024

Copy link
Copy Markdown
Contributor Author

sgtm — let me know if you want me to update the pr for 2.0 or if you’d rather take care of it yourself

@sentrivana
sentrivana changed the base branch from master to sentry-sdk-2.0 March 5, 2024 13:15
@sentrivana
sentrivana merged commit f2e7c54 into getsentry:sentry-sdk-2.0 Mar 5, 2024
@sentrivana

Copy link
Copy Markdown
Contributor

Merged to 2.0 now -- now we'll only have to live with the tests being slow on master for a couple weeks until we merge the 2.0 branch. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants