mirror of https://github.com/pulumi/pulumi.git
7309681b5b
Python 3.12 requires `grpcio` 1.59.0 or higher. Unfortunately, there is a regression in `grpcio` 1.58.0 through the latest version (currently 1.60.0) which causes any error returned from a Python gRPC server to be written to stderr, including UNIMPLEMENTED errors. This primarily affects Python dynamic providers, which don't have implementations for `CheckConfig` and `DiffConfig`, resulting in a traceback error being emitted to stderr when the engine calls these, which is visible to users. This `grpcio` regression has been fixed upstream, but the fix has not been released yet. We've been waiting for a 1.60.1 patch release. This has not been great for our Python users who are using Python 3.12. It's particularly bad for new Pulumi users who are using Python 3.12 and are trying to get started with Pulumi. For these users, when trying to install the `pulumi` PyPi package (i.e. via `pulumi new python`) the installation fails with an error because it is pinned to depending on an older version of `grpcio` which doesn't work on Python 3.12. This commit works around the problem by providing default implementations of `CheckConfig` and `DiffConfig` for python dynamic providers and the component provider API, so that no error is emitted to stderr when the engine calls these methods. The default implementations for these are the same behavior that the engine would use if these methods had returned UNIMPLEMENTED. I believe these are the only two methods affected by this. Other methods like `Invoke`, `Call`, `StreamInvoke`, `Construct`, `Attach`, `GetMapping`, and `GetMappings`, continue to return UNIMPLEMENTED for dynamic providers, which I think is OK; I don't believe these will be called by the engine under normal circumstances. Out of an abundance of caution, the `pulumi` package continues to depend on the pinned version of `grpcio` when installing on versions of Python less than 3.12. On Python 3.12 or greater, we now depend on `grpcio` `~=1.60.0`. 1.60.0 doesn't have the fix for the regression, but the workaround should allow things to work on Python 3.12 as before. Once 1.60.1 is released, we can look into updating the `grpcio` dependency to `~=1.60.1` for all versions of Python, and possibly revert the workarounds, if we want. Note: #14474 added a test for dynamic providers to ensure nothing is written to stderr. The test would fail if the workaround in this PR did not work as intended: https://github.com/pulumi/pulumi/pull/14474/files#diff-d92ccd283e08eadab2597825103e45cdaa96fea93324bc4d4d3b1d2b83c51b76 This PR depends on several other smaller PRs: - https://github.com/pulumi/pulumi/pull/15220 - https://github.com/pulumi/pulumi/pull/15221 - https://github.com/pulumi/pulumi/pull/15222 - https://github.com/pulumi/pulumi/pull/15223 - https://github.com/pulumi/pulumi/pull/15224 - https://github.com/pulumi/pulumi/pull/15225 - https://github.com/pulumi/pulumi/pull/15226 Fixes #14258 |
||
---|---|---|
.. | ||
brew.sh | ||
get-job-matrix.py | ||
get-language-providers.sh | ||
get-pulumi-watch.sh | ||
get-version | ||
go-test.py | ||
go-update.sh | ||
go-wrapper.sh | ||
integration_test_subsets.py | ||
normpath | ||
prep-for-goreleaser.sh | ||
publish_npm.sh | ||
pulumi-version.sh | ||
retry | ||
reversion.js | ||
tidy.sh | ||
versions.sh |