Updates the node SDK to have types for the generated protobufs and grpc
services. No more `any`.
I don't think these types show up on any user facing parts of the SDK.
The two places they could show up are the mock monitor (but I've left
that as any for now) and the provider interfaces (which I've also left
alone for now).
But this fixes up most of our sdk internal code to have types, which
flagged a couple of oddities like assuming `Input<string>` was `string`
in the alias code, and a whole load of missing undefined checks.
#14259 upgraded grpcio to 1.59.2, to support Python 3.12. Unfortunately,
grpcio >=1.58.0 has a problem where calls to unimplemented gRPC methods
cause a traceback to be emitted to the server's stderr, which affects
Python dynamic providers, which don't implement `DiffConfig`. The result
is a traceback diagnostic shown for the Pulumi program using the dynamic
provider.
This PR fixes this by reverting the change, downgrading grpcio back to
1.56.2.
The existing Python dynamic provider diagnostic test has been extended
to check to make sure there are no unexpected diagnostics, which fails
before the revert, and passes after.
An upstream issue has been opened:
https://github.com/grpc/grpc/issues/34853
The issue to support Python 3.12 has been re-opened: #14258 (currently
blocked on the upstream issue)
Fixes#14442
The codegen and test files changed because the old sed script wasn't
correctly fixing up those files, see
https://github.com/pulumi/pulumi/pull/14424 for more on attempting to
fix those scripts. But this gets rid of one of those sed scripts
entirely.
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
The PR updates the `grpcio` dependency for the Python SDK.
I also made a change here to [no longer fix the grpcio version to a
specific
one](https://iscinumpy.dev/post/bound-version-constraints/#tldr) - which
makes it very hard to use pulumi in other projects with other
dependencies.
Fixes#14258
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
---------
Co-authored-by: Fraser Waters <frassle@gmail.com>
Co-authored-by: Fraser Waters <fraser@pulumi.com>
Currently, pinning to a version of grpcio <1.50 can cause build errors
on newer versions of python+pip - the existing setup.py install method
of building libararies is being deprecated and wheels are not being
backported for older versions of grpcio. Since this change is a no-op
as far as our python proto clients are concerned, it feels safe to bump
to a version that will be supported going forward