Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ jobs:
- run: uv add --dev --python 3.10 "googleapis-common-protos==1.70.0"
- run: uv add --python 3.10 "protobuf<4"
- run: uv sync --all-extras
- run: cargo install --locked nexgen --version 0.2.2 --features advanced --force
- run: poe build-develop
- run: poe gen-protos
- name: Check generation unchanged
Expand Down
4 changes: 2 additions & 2 deletions scripts/gen_nexus_system_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/ "v1"
/ "request_response.proto"
)
NEX_GEN_VERSION = "0.2.1"
NEX_GEN_VERSION = "0.2.2"


def nex_gen_command() -> list[str]:
Expand All @@ -48,7 +48,7 @@ def nex_gen_command() -> list[str]:
"cargo",
"install",
"--locked",
"nex-gen",
"nexgen",
"--version",
NEX_GEN_VERSION,
"--features",
Expand Down
15 changes: 15 additions & 0 deletions scripts/nex_gen_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@ def memo_to_proto(
return message


def header_from_proto(
proto: common_pb2.Header,
) -> collections.abc.Mapping[str, object]:
return {key: _payload_to_value(value) for key, value in proto.fields.items()}


def header_to_proto(
header: collections.abc.Mapping[str, object],
) -> common_pb2.Header:
message = common_pb2.Header()
for key, value in header.items():
message.fields[key].CopyFrom(_value_to_payload(value))
return message


def duration_from_proto(proto: google.protobuf.duration_pb2.Duration) -> timedelta:
return proto.ToTimedelta()

Expand Down
8 changes: 4 additions & 4 deletions temporalio/api/enums/v1/failed_cause_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -556,17 +556,17 @@ class _ResourceExhaustedScopeEnumTypeWrapper(
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED: _ResourceExhaustedScope.ValueType # 0
RESOURCE_EXHAUSTED_SCOPE_NAMESPACE: _ResourceExhaustedScope.ValueType # 1
"""Exhausted resource is a system-level resource."""
RESOURCE_EXHAUSTED_SCOPE_SYSTEM: _ResourceExhaustedScope.ValueType # 2
"""Exhausted resource is a namespace-level resource."""
RESOURCE_EXHAUSTED_SCOPE_SYSTEM: _ResourceExhaustedScope.ValueType # 2
"""Exhausted resource is a system-level resource."""

class ResourceExhaustedScope(
_ResourceExhaustedScope, metaclass=_ResourceExhaustedScopeEnumTypeWrapper
): ...

RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED: ResourceExhaustedScope.ValueType # 0
RESOURCE_EXHAUSTED_SCOPE_NAMESPACE: ResourceExhaustedScope.ValueType # 1
"""Exhausted resource is a system-level resource."""
RESOURCE_EXHAUSTED_SCOPE_SYSTEM: ResourceExhaustedScope.ValueType # 2
"""Exhausted resource is a namespace-level resource."""
RESOURCE_EXHAUSTED_SCOPE_SYSTEM: ResourceExhaustedScope.ValueType # 2
"""Exhausted resource is a system-level resource."""
global___ResourceExhaustedScope = ResourceExhaustedScope
25 changes: 4 additions & 21 deletions temporalio/api/workflowservice/v1/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,25 +1285,21 @@ def GetWorkerTaskReachability(self, request, context):

def DescribeDeployment(self, request, context):
"""Describes a worker deployment.
Experimental. This API might significantly change or be removed in a future release.
Deprecated. Replaced with `DescribeWorkerDeploymentVersion`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def DescribeWorkerDeploymentVersion(self, request, context):
"""Describes a worker deployment version.
Experimental. This API might significantly change or be removed in a future release.
"""
"""Describes a worker deployment version."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def ListDeployments(self, request, context):
"""Lists worker deployments in the namespace. Optionally can filter based on deployment series
name.
Experimental. This API might significantly change or be removed in a future release.
Deprecated. Replaced with `ListWorkerDeployments`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand All @@ -1317,7 +1313,6 @@ def GetDeploymentReachability(self, request, context):
Calculating reachability is relatively expensive. Therefore, server might return a recently
cached value. In such a case, the `last_update_time` will inform you about the actual
reachability calculation time.
Experimental. This API might significantly change or be removed in a future release.
Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand All @@ -1326,7 +1321,6 @@ def GetDeploymentReachability(self, request, context):

def GetCurrentDeployment(self, request, context):
"""Returns the current deployment (and its info) for a given deployment series.
Experimental. This API might significantly change or be removed in a future release.
Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand All @@ -1336,7 +1330,6 @@ def GetCurrentDeployment(self, request, context):
def SetCurrentDeployment(self, request, context):
"""Sets a deployment as the current deployment for its deployment series. Can optionally update
the metadata of the deployment as well.
Experimental. This API might significantly change or be removed in a future release.
Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand All @@ -1346,24 +1339,20 @@ def SetCurrentDeployment(self, request, context):
def SetWorkerDeploymentCurrentVersion(self, request, context):
"""Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping
Version if it is the Version being set as Current.
Experimental. This API might significantly change or be removed in a future release.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def DescribeWorkerDeployment(self, request, context):
"""Describes a Worker Deployment.
Experimental. This API might significantly change or be removed in a future release.
"""
"""Describes a Worker Deployment."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def DeleteWorkerDeployment(self, request, context):
"""Deletes records of (an old) Deployment. A deployment can only be deleted if
it has no Version in it.
Experimental. This API might significantly change or be removed in a future release.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
Expand All @@ -1376,7 +1365,6 @@ def DeleteWorkerDeploymentVersion(self, request, context):
- It has no active pollers (none of the task queues in the Version have pollers)
- It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition
can be skipped by passing `skip-drainage=true`.
Experimental. This API might significantly change or be removed in a future release.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
Expand All @@ -1385,16 +1373,13 @@ def DeleteWorkerDeploymentVersion(self, request, context):
def SetWorkerDeploymentRampingVersion(self, request, context):
"""Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for
gradual ramp to unversioned workers too.
Experimental. This API might significantly change or be removed in a future release.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def ListWorkerDeployments(self, request, context):
"""Lists all Worker Deployments that are tracked in the Namespace.
Experimental. This API might significantly change or be removed in a future release.
"""
"""Lists all Worker Deployments that are tracked in the Namespace."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
Expand Down Expand Up @@ -1436,9 +1421,7 @@ def ValidateWorkerDeploymentVersionComputeConfig(self, request, context):
raise NotImplementedError("Method not implemented!")

def UpdateWorkerDeploymentVersionMetadata(self, request, context):
"""Updates the user-given metadata attached to a Worker Deployment Version.
Experimental. This API might significantly change or be removed in a future release.
"""
"""Updates the user-given metadata attached to a Worker Deployment Version."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
Expand Down
Loading
Loading