pulumi/tests/integration
Justin Van Patten 7309681b5b
Support Python 3.12 (#15190)
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
2024-01-24 22:24:34 +00:00
..
about Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
aliases Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
backend/filestate generate unique stack names for tests (#15230) 2024-01-24 11:41:04 +00:00
cloud_secrets_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
component_provider_schema Add RunPlugin support for python 2023-03-06 21:35:39 +00:00
config_basic Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
config_capture_e2e/nodejs Revert package.json lookup fix. 2023-05-15 14:14:57 -04:00
config_missing Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
config_secrets_warn Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
construct_component_configure_provider Changelog and go.mod updates for v3.102.0 (#15182) 2024-01-19 02:14:13 +00:00
construct_component_error_apply Update @types/node version in tests 2023-02-07 14:20:27 +00:00
construct_component_id_output [python/sdk] Allow remote components to use output property called id (#15115) 2024-01-18 13:54:09 +00:00
construct_component_methods Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_methods_errors Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_methods_provider Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_methods_resources Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_methods_unknown Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_output_values Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_plain Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
construct_component_provider Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_provider_explicit Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
construct_component_provider_propagation Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
construct_component_resource_options Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
construct_component_slow Update @types/node version in tests 2023-02-07 14:20:27 +00:00
construct_component_unknown Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
construct_nested_component/go Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
custom_timeouts Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
delete_before_create Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
deleted_with Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
dependency_steps Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
double_pending_delete Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
duplicate_urns Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
dynamic Pass PULUMI_CONFIG through to provider plugins 2023-04-05 10:17:18 +01:00
ee_perf Use prefered `new pulumi.Config()` form 2019-01-31 16:11:57 -08:00
empty Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
enums [tests/integration] Remove `pulumi` from `requirements.txt` (#15226) 2024-01-24 14:16:40 +00:00
environments_basic [environments] Add integration tests (#14144) 2023-10-12 16:39:26 +00:00
environments_merge [environments] Add integration tests (#14144) 2023-10-12 16:39:26 +00:00
exclude_protected Implement the --exclude-protected feature (#8359) 2021-11-15 11:45:14 -08:00
explicit_provider Revert package.json lookup fix. 2023-05-15 14:14:57 -04:00
gather_plugin Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
get_created Revert package.json lookup fix. 2023-05-15 14:14:57 -04:00
get_resource Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
go Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
invalid_package_json Revert package.json lookup fix. 2023-05-15 14:14:57 -04:00
large_resource [tests/integration] Remove `pulumi` from `requirements.txt` (#15226) 2024-01-24 14:16:40 +00:00
nodejs Warn about undefined stack outputs 2023-07-28 14:33:04 +01:00
partial_state Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
partial_values Propagate inputs to outputs during preview. (#3327) 2019-11-11 12:09:34 -08:00
policy Start policy packs in parallel (#14495) 2023-11-20 14:08:32 +00:00
printf Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
project_main Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
project_main_abs Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
project_main_parent/foo Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
protect_resources Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
provider_secret_config Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
python [tests/integration] Remove `pulumi` from `requirements.txt` (#15226) 2024-01-24 14:16:40 +00:00
python_await [tests/integration] Remove `pulumi` from `requirements.txt` (#15226) 2024-01-24 14:16:40 +00:00
query Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
read Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
recreate_resource_check Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
refresh/go Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
resource_refs_get_resource Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
rotate_passphrase Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
secret_outputs [sdk/python] Fix secret regression (#5496) 2020-10-01 14:57:51 -07:00
single_resource Suppress JSON outputs in preview correctly (#2771) 2019-05-25 12:10:38 +02:00
stack_bad_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_dependencies Remove existing lock files 2018-11-12 15:33:58 -08:00
stack_outputs Remove dotnet 2022-12-13 16:13:53 +00:00
stack_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_project_name Actually fix the naming test (#10554) 2022-08-31 20:52:23 +01:00
stack_reference Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
stack_reference_multi/python Regression tests for StackReference in the Python SDK (#3913) 2020-02-17 10:40:46 -08:00
stack_reference_secrets/nodejs Remove dotnet 2022-12-13 16:13:53 +00:00
state_rename_parent Bump the go_modules group across 29 directories with 1 update (#15131) 2024-01-11 16:05:38 +00:00
steps Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
targets Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
transformations Update github.com/cloudflare/circl to v1.3.7 (#15151) 2024-01-16 08:59:57 +00:00
tsconfig Add tsconfig option to specify tsconfig path (#8452) 2021-11-22 11:42:39 -08:00
types Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
unsafe_snapshot_tests/bad_resource Update tests/integration/unsafe_snapshot_tests/bad_resource/resource.ts 2022-09-15 08:00:36 -07:00
valid-property-names [testing] Add integration tests for regressions in property name parsing (#14681) 2023-12-01 17:27:33 +00:00
.gitignore ci: Enable async component builds 2022-09-14 10:06:05 -07:00
appdash_test.go Reimport appdash from our mirror (#14701) 2023-11-30 14:21:35 +00:00
component_setup.sh Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
integration_acceptance_test.go Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
integration_go_acceptance_test.go Split up acceptance tests (#14830) 2023-12-13 04:08:04 +00:00
integration_go_test.go Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
integration_nodejs_acceptance_test.go Don't swallow file not found in fsutil.FileCopy (#14695) 2023-12-06 13:29:40 +00:00
integration_nodejs_test.go Fix remaining lint issues (#14688) 2023-12-02 17:16:09 +00:00
integration_python_acceptance_test.go Support Python 3.12 (#15190) 2024-01-24 22:24:34 +00:00
integration_python_test.go [tests/integration] Fix `resource_args` for Python 3.12 (#15224) 2024-01-24 12:47:34 +00:00
integration_test.go Fix some more lint issues (#14663) 2023-11-28 16:43:48 +00:00
integration_util_test.go Replace some more uses of assert.Contains(err.Error()) with assert.ErrorContains (#14863) 2023-12-15 17:45:32 +00:00