pulumi/pkg/resource/deploy
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
..
deploytest Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
providers Package versions are required for parameterized packages (#16875) 2024-08-05 16:01:28 +00:00
builtins.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
builtins_test.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
deployment.go Ensure internal provider state doesn't clash with user config (#16837) 2024-07-30 12:22:32 +00:00
deployment_executor.go continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00
deployment_executor_test.go Better handle property dependencies and `deletedWith` (#16088) 2024-05-03 17:08:06 +00:00
deployment_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
import.go Extend the TestReplacementParameterizedProvider test (#16644) 2024-07-15 08:33:36 +00:00
import_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
manifest.go Split Manifest type to it's own file (#8712) 2022-01-10 12:25:24 +00:00
manifest_test.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plan.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
plan_test.go [ci] `pkg/resource/deploy` coverage (#14831) 2023-12-19 16:14:40 +00:00
snapshot.go Revert "Revert "Run integration tests and dev builds with race detection" (#15998)" (#16148) 2024-05-09 16:15:41 +00:00
snapshot_test.go Revert "Revert "Run integration tests and dev builds with race detection" (#15998)" (#16148) 2024-05-09 16:15:41 +00:00
source.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_error.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_error_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_eval.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
source_eval_test.go Update lifecycle test APIs to match provider APIs (#16793) 2024-07-26 12:14:45 +00:00
source_null.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_query.go Initial work for parameterized providers (#16281) 2024-06-10 17:28:47 +00:00
source_query_test.go Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
state_builder.go Revert "Revert "Run integration tests and dev builds with race detection" (#15998)" (#16148) 2024-05-09 16:15:41 +00:00
state_builder_test.go When changing parents also fix URNs (#13935) 2023-09-14 19:52:27 +00:00
step.go Don't set `PendingReplacement` until `Delete` succeeds (#16699) 2024-07-18 12:27:06 +00:00
step_executor.go Remove `Step.Apply`'s `preview` parameter (#16367) 2024-06-14 10:19:13 +00:00
step_executor_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
step_generator.go Replace `result.Result` with native errors (#17044) 2024-08-22 14:39:59 +00:00
step_generator_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
step_test.go Update lifecycle test APIs to match provider APIs (#16793) 2024-07-26 12:14:45 +00:00
target.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
target_test.go upgrade to latest version of golangci-lint (#15977) 2024-04-19 06:20:33 +00:00