Skip to content

Commit

Permalink
Regenerate .pyi files, sort diffs on proto cksum
Browse files Browse the repository at this point in the history
Remove trailing '/' from find command
  • Loading branch information
iwahbe committed Nov 10, 2022
1 parent f33924e commit d0982c6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,25 @@ ensure: .ensure.phony go.ensure $(SUB_PROJECTS:%=%_ensure)
@touch .ensure.phony

.PHONY: build-proto
PROTO_FILES := $(sort $(shell find proto/ -type f -name '*.proto') proto/generate.sh proto/build-container/Dockerfile $(wildcard proto/build-container/scripts/*))
PROTO_FILES := $(sort $(shell find proto -type f -name '*.proto') proto/generate.sh proto/build-container/Dockerfile $(wildcard proto/build-container/scripts/*))
PROTO_CKSUM = cksum ${PROTO_FILES} | sort
build-proto:
@printf "Protobuffer interfaces are ....... "
@if [ "$$(cat proto/.checksum.txt)" = "$$(cksum $(PROTO_FILES))" ]; then \
@if [ "$$(cat proto/.checksum.txt)" = "`${PROTO_CKSUM}`" ]; then \
printf "\033[0;32mup to date\033[0m\n"; \
else \
printf "\033[0;34mout of date: REBUILDING\033[0m\n"; \
cd proto && ./generate.sh || exit 1; \
cd ../ && cksum $(PROTO_FILES) > proto/.checksum.txt; \
cd ../ && ${PROTO_CKSUM} > proto/.checksum.txt; \
printf "\033[0;34mProtobuffer interfaces have been \033[0;32mREBUILT\033[0m\n"; \
fi

.PHONY: check-proto
check-proto:
@if [ "$$(cat proto/.checksum.txt)" != "$$(cksum $(PROTO_FILES))" ]; then \
@if [ "$$(cat proto/.checksum.txt)" != "`${PROTO_CKSUM}`" ]; then \
echo "Protobuff checksum doesn't match. Run \`make build-proto\` to rebuild."; \
echo "Expecting "; cat proto/.checksum.txt; \
echo "Found `${PROTO_CKSUM}`"; \
exit 1; \
fi

Expand Down
24 changes: 12 additions & 12 deletions proto/.checksum.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
283055245 2069 proto/build-container/Dockerfile
3003861496 625 proto/build-container/scripts/install-go.sh
853251015 873 proto/build-container/scripts/install-node.sh
2003827277 549 proto/build-container/scripts/install-packages.sh
3888622976 1701 proto/build-container/scripts/install-protobuf-tools.sh
1325776472 11014 proto/pulumi/resource.proto
1405145341 1741 proto/pulumi/alias.proto
1451439690 19667 proto/pulumi/provider.proto
1574098198 4061 proto/google/protobuf/status.proto
1829186103 1047 proto/build-container/scripts/install-python.sh
1949619858 9233 proto/pulumi/analyzer.proto
2003827277 549 proto/build-container/scripts/install-packages.sh
2099022623 1282 proto/build-container/scripts/utils.sh
2624416732 5776 proto/generate.sh
1574098198 4061 proto/google/protobuf/status.proto
1405145341 1741 proto/pulumi/alias.proto
1949619858 9233 proto/pulumi/analyzer.proto
2700626499 1743 proto/pulumi/plugin.proto
283055245 2069 proto/build-container/Dockerfile
2889436496 3240 proto/pulumi/engine.proto
3421371250 793 proto/pulumi/errors.proto
3003861496 625 proto/build-container/scripts/install-go.sh
3300935796 5024 proto/pulumi/language.proto
2700626499 1743 proto/pulumi/plugin.proto
1451439690 19667 proto/pulumi/provider.proto
1325776472 11014 proto/pulumi/resource.proto
3421371250 793 proto/pulumi/errors.proto
3888622976 1701 proto/build-container/scripts/install-protobuf-tools.sh
853251015 873 proto/build-container/scripts/install-node.sh
6 changes: 5 additions & 1 deletion sdk/python/lib/pulumi/runtime/proto/resource_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ class RegisterResourceRequest(google.protobuf.message.Message):
PLUGINDOWNLOADURL_FIELD_NUMBER: builtins.int
RETAINONDELETE_FIELD_NUMBER: builtins.int
ALIASES_FIELD_NUMBER: builtins.int
DELETEDWITH_FIELD_NUMBER: builtins.int
type: builtins.str
"""the type of the object allocated."""
name: builtins.str
Expand Down Expand Up @@ -333,6 +334,8 @@ class RegisterResourceRequest(google.protobuf.message.Message):
@property
def aliases(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[pulumi.alias_pb2.Alias]:
"""a list of additional aliases that should be considered the same."""
deletedWith: builtins.str
"""if set the engine will not call the resource providers delete method for this resource when specified resource is deleted."""
def __init__(
self,
*,
Expand Down Expand Up @@ -362,9 +365,10 @@ class RegisterResourceRequest(google.protobuf.message.Message):
pluginDownloadURL: builtins.str = ...,
retainOnDelete: builtins.bool = ...,
aliases: collections.abc.Iterable[pulumi.alias_pb2.Alias] | None = ...,
deletedWith: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["customTimeouts", b"customTimeouts", "object", b"object"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["acceptResources", b"acceptResources", "acceptSecrets", b"acceptSecrets", "additionalSecretOutputs", b"additionalSecretOutputs", "aliasURNs", b"aliasURNs", "aliases", b"aliases", "custom", b"custom", "customTimeouts", b"customTimeouts", "deleteBeforeReplace", b"deleteBeforeReplace", "deleteBeforeReplaceDefined", b"deleteBeforeReplaceDefined", "dependencies", b"dependencies", "ignoreChanges", b"ignoreChanges", "importId", b"importId", "name", b"name", "object", b"object", "parent", b"parent", "pluginDownloadURL", b"pluginDownloadURL", "propertyDependencies", b"propertyDependencies", "protect", b"protect", "provider", b"provider", "providers", b"providers", "remote", b"remote", "replaceOnChanges", b"replaceOnChanges", "retainOnDelete", b"retainOnDelete", "supportsPartialValues", b"supportsPartialValues", "type", b"type", "version", b"version"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["acceptResources", b"acceptResources", "acceptSecrets", b"acceptSecrets", "additionalSecretOutputs", b"additionalSecretOutputs", "aliasURNs", b"aliasURNs", "aliases", b"aliases", "custom", b"custom", "customTimeouts", b"customTimeouts", "deleteBeforeReplace", b"deleteBeforeReplace", "deleteBeforeReplaceDefined", b"deleteBeforeReplaceDefined", "deletedWith", b"deletedWith", "dependencies", b"dependencies", "ignoreChanges", b"ignoreChanges", "importId", b"importId", "name", b"name", "object", b"object", "parent", b"parent", "pluginDownloadURL", b"pluginDownloadURL", "propertyDependencies", b"propertyDependencies", "protect", b"protect", "provider", b"provider", "providers", b"providers", "remote", b"remote", "replaceOnChanges", b"replaceOnChanges", "retainOnDelete", b"retainOnDelete", "supportsPartialValues", b"supportsPartialValues", "type", b"type", "version", b"version"]) -> None: ...

global___RegisterResourceRequest = RegisterResourceRequest

Expand Down

0 comments on commit d0982c6

Please sign in to comment.