pulumi/sdk/go/common/resource/plugin
Fraser Waters c7ed4024ff Support for integers on the wire and state protocol
An exploration into how we could support int64 as well as float64 as a
first class type in Pulumi.

There's some inherit trickiness with this because we use JSON in a few
places, state files most obviously but `PropertyValue` on the wire is
using the protobuf `Struct` and `Value` types which are just mappings to
JSON as well.

JSON doesn't have an int64 type, and while the Go JSON marshaller can
read/write int64s it's not a great behaviour to rely on given mixed
support for that across languages. Further the protobuf `Value` type
only supports float64s.

So we support integers similar to our other special types (like assets)
and wrap them in an object with a special signature field. The value
itself is either a number (if it can safely roundtrip to float64 and
back again) or a string.

Providers, SDKs and the engine communicate support for integers via
`AcceptsIntegers` fields in their interfaces (or similar). When
transmitting to a peer that doesn't support integers (e.g. an old SDK,
or old provider) all integer values are mapped back to standard number
values.

As this changes the serialisation of property values in the state file
it will trigger errors if old engines try to load a state file
containing integers.
2024-08-23 13:36:45 +01:00
..
analyzer.go Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
analyzer_plugin.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
check.go Enable importas linter (#15167) 2024-01-17 14:56:37 +00:00
config_source.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
context.go Add NodeJS test for parameterized providers #2 (#16901) 2024-08-09 08:34:29 +00:00
context_test.go Fix data race in plugin.Context 2023-03-31 07:15:11 -07:00
converter.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
converter_plugin.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
converter_plugin_test.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
converter_server.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
converter_server_test.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
diagnostic.go Make language-python it's own module (#13819) 2023-08-31 16:35:21 +00:00
diagnostic_test.go Allow converter plugins to return diagnostics 2023-06-05 17:38:59 +01:00
doc.go Provider implementer's guide draft (#6322) 2021-04-13 14:11:02 -07:00
host.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
host_server.go Enable importas linter (#15167) 2024-01-17 14:56:37 +00:00
host_test.go Lock access to the plugin loading channels 2023-08-10 23:40:23 +01:00
langruntime.go Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
langruntime_plugin.go Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
langruntime_test.go Add not-found markers to missing executables for packagemanagers (#16488) 2024-06-28 23:21:55 +00:00
plugin.go Python parameterized provider test (#16491) 2024-07-16 10:55:38 +00:00
plugin_test.go Revert "resource/plugin: Shut down plugins gracefully (#13795)" (#13844) 2023-08-31 16:29:55 +00:00
provider.go Package versions are required for parameterized packages (#16875) 2024-08-05 16:01:28 +00:00
provider_plugin.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_plugin_test.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_server.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_server_test.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_test.go Fix PropertyPaths generated by NewDetailedDiffFromObjectDiff (#14337) 2023-10-25 10:39:03 +00:00
provider_unimplemented.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
rpc.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
rpc_rapid_test.go Remove deprecated Protobufs imports (#15158) 2024-01-17 09:35:20 +00:00
rpc_test.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
server.go Add mapping service to converter 2023-03-24 17:09:17 +00:00