Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate .pyi files, sort diffs on proto cksum #11313

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,24 @@ 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 --key=3
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."; \
${PROTO_CKSUM} | diff - proto/.checksum.txt; \
exit 1; \
fi

Expand Down
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