pulumi/sdk/nodejs/proto
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
..
codegen Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
testing Add SupportPack to schemas to write out in the new style (#15713) 2024-03-22 09:25:46 +00:00
alias_grpc_pb.js feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
alias_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
alias_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
analyzer_grpc_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
analyzer_grpc_pb.js Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
analyzer_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
analyzer_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
callback_grpc_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
callback_grpc_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
callback_pb.d.ts Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
callback_pb.js Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
converter_grpc_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_grpc_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
engine_grpc_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
engine_grpc_pb.js Compile protobufs with "pulumi" namespace (#10074) 2022-07-12 14:45:03 +01:00
engine_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
engine_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
errors_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
errors_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
errors_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
language_grpc_pb.d.ts Query language runtime for options during “pulumi new” (#16346) 2024-06-17 17:10:55 +00:00
language_grpc_pb.js Query language runtime for options during “pulumi new” (#16346) 2024-06-17 17:10:55 +00:00
language_pb.d.ts Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
language_pb.js Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
plugin_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
plugin_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
plugin_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
provider_grpc_pb.d.ts Add Paramaterize to provider interface (#16174) 2024-05-15 16:22:39 +00:00
provider_grpc_pb.js Document news ignore changes processing in the provider protocol (#16725) 2024-07-29 14:28:39 +00:00
provider_pb.d.ts Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_pb.js Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
resource_grpc_pb.d.ts implement engine support for invoke transforms (#16559) 2024-07-11 16:01:44 +00:00
resource_grpc_pb.js implement engine support for invoke transforms (#16559) 2024-07-11 16:01:44 +00:00
resource_pb.d.ts Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
resource_pb.js Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
source_grpc_pb.js [engine] Add support for source positions 2023-07-10 14:35:40 -07:00
source_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
source_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
status_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
status_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
status_pb.js Compile protobufs with "pulumi" namespace (#10074) 2022-07-12 14:45:03 +01:00