Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
- run: uv sync --all-extras
- run: poe bridge-lint
if: ${{ matrix.clippyLinter }}
- run: poe lint
- run: poe build-develop
- run: poe lint
- run: mkdir junit-xml
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 15
Expand Down Expand Up @@ -153,8 +153,8 @@ jobs:
- run: uv tool install poethepoet
- run: uv lock --upgrade
- run: uv sync --all-extras
- run: poe lint
- run: poe build-develop
- run: poe lint
- run: mkdir junit-xml
- run: poe test -s --junit-xml=junit-xml/latest-deps.xml
timeout-minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions scripts/gen_bridge_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str:
call: RpcCall,
) -> PyResult<Bound<'p, PyAny>> {
self.runtime.assert_same_process("use client")?;
use temporal_client::${descriptor_name};
use temporalio_client::${descriptor_name};
let mut retry_client = self.retry_client.clone();
self.runtime.future_into_py(py, async move {
let bytes = match call.rpc.as_str() {
Expand All @@ -182,7 +182,7 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str:
"Unknown RPC call {}",
call.rpc
)))
}
}
}?;
Ok(bytes)
})
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

base_dir = Path(__file__).parent.parent
proto_dir = (
base_dir / "temporalio" / "bridge" / "sdk-core" / "sdk-core-protos" / "protos"
base_dir / "temporalio" / "bridge" / "sdk-core" / "crates" / "common" / "protos"
)
api_proto_dir = proto_dir / "api_upstream"
api_cloud_proto_dir = proto_dir / "api_cloud_upstream"
Expand Down
3 changes: 2 additions & 1 deletion temporalio/api/cloud/account/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from .message_pb2 import Account, AccountSpec, Metrics, MetricsSpec
from .message_pb2 import Account, AccountSpec, AuditLogSinkSpec, Metrics, MetricsSpec

__all__ = [
"Account",
"AccountSpec",
"AuditLogSinkSpec",
"Metrics",
"MetricsSpec",
]
35 changes: 26 additions & 9 deletions temporalio/api/cloud/account/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions temporalio/api/cloud/account/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import google.protobuf.descriptor
import google.protobuf.message

import temporalio.api.cloud.resource.v1.message_pb2
import temporalio.api.cloud.sink.v1.message_pb2

if sys.version_info >= (3, 8):
import typing as typing_extensions
Expand Down Expand Up @@ -140,3 +141,62 @@ class Account(google.protobuf.message.Message):
) -> None: ...

global___Account = Account

class AuditLogSinkSpec(google.protobuf.message.Message):
"""AuditLogSinkSpec is only used by Audit Log"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

NAME_FIELD_NUMBER: builtins.int
KINESIS_SINK_FIELD_NUMBER: builtins.int
PUB_SUB_SINK_FIELD_NUMBER: builtins.int
ENABLED_FIELD_NUMBER: builtins.int
name: builtins.str
"""Name of the sink e.g. "audit_log_01" """
@property
def kinesis_sink(self) -> temporalio.api.cloud.sink.v1.message_pb2.KinesisSpec:
"""The KinesisSpec when destination_type is Kinesis"""
@property
def pub_sub_sink(self) -> temporalio.api.cloud.sink.v1.message_pb2.PubSubSpec:
"""The PubSubSpec when destination_type is PubSub"""
enabled: builtins.bool
"""Enabled indicates whether the sink is enabled or not."""
def __init__(
self,
*,
name: builtins.str = ...,
kinesis_sink: temporalio.api.cloud.sink.v1.message_pb2.KinesisSpec | None = ...,
pub_sub_sink: temporalio.api.cloud.sink.v1.message_pb2.PubSubSpec | None = ...,
enabled: builtins.bool = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal[
"kinesis_sink",
b"kinesis_sink",
"pub_sub_sink",
b"pub_sub_sink",
"sink_type",
b"sink_type",
],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"enabled",
b"enabled",
"kinesis_sink",
b"kinesis_sink",
"name",
b"name",
"pub_sub_sink",
b"pub_sub_sink",
"sink_type",
b"sink_type",
],
) -> None: ...
def WhichOneof(
self, oneof_group: typing_extensions.Literal["sink_type", b"sink_type"]
) -> typing_extensions.Literal["kinesis_sink", "pub_sub_sink"] | None: ...

global___AuditLogSinkSpec = AuditLogSinkSpec
8 changes: 8 additions & 0 deletions temporalio/api/cloud/cloudservice/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
RemoveUserGroupMemberResponse,
RenameCustomSearchAttributeRequest,
RenameCustomSearchAttributeResponse,
SetServiceAccountNamespaceAccessRequest,
SetServiceAccountNamespaceAccessResponse,
SetUserGroupNamespaceAccessRequest,
SetUserGroupNamespaceAccessResponse,
SetUserNamespaceAccessRequest,
Expand All @@ -109,6 +111,8 @@
UpdateUserGroupResponse,
UpdateUserRequest,
UpdateUserResponse,
ValidateAccountAuditLogSinkRequest,
ValidateAccountAuditLogSinkResponse,
ValidateNamespaceExportSinkRequest,
ValidateNamespaceExportSinkResponse,
)
Expand Down Expand Up @@ -202,6 +206,8 @@
"RemoveUserGroupMemberResponse",
"RenameCustomSearchAttributeRequest",
"RenameCustomSearchAttributeResponse",
"SetServiceAccountNamespaceAccessRequest",
"SetServiceAccountNamespaceAccessResponse",
"SetUserGroupNamespaceAccessRequest",
"SetUserGroupNamespaceAccessResponse",
"SetUserNamespaceAccessRequest",
Expand All @@ -224,6 +230,8 @@
"UpdateUserGroupResponse",
"UpdateUserRequest",
"UpdateUserResponse",
"ValidateAccountAuditLogSinkRequest",
"ValidateAccountAuditLogSinkResponse",
"ValidateNamespaceExportSinkRequest",
"ValidateNamespaceExportSinkResponse",
]
Expand Down
190 changes: 127 additions & 63 deletions temporalio/api/cloud/cloudservice/v1/request_response_pb2.py

Large diffs are not rendered by default.

114 changes: 113 additions & 1 deletion temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ class GetNamespacesRequest(google.protobuf.message.Message):
NAME_FIELD_NUMBER: builtins.int
page_size: builtins.int
"""The requested size of the page to retrieve.
Cannot exceed 1000.
Cannot exceed 1000.
Optional, defaults to 100.
"""
page_token: builtins.str
Expand Down Expand Up @@ -2655,6 +2655,88 @@ class UpdateServiceAccountResponse(google.protobuf.message.Message):

global___UpdateServiceAccountResponse = UpdateServiceAccountResponse

class SetServiceAccountNamespaceAccessRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

SERVICE_ACCOUNT_ID_FIELD_NUMBER: builtins.int
NAMESPACE_FIELD_NUMBER: builtins.int
ACCESS_FIELD_NUMBER: builtins.int
RESOURCE_VERSION_FIELD_NUMBER: builtins.int
ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int
service_account_id: builtins.str
"""The ID of the service account to update."""
namespace: builtins.str
"""The namespace to set permissions for."""
@property
def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess:
"""The namespace access to assign the service account."""
resource_version: builtins.str
"""The version of the service account for which this update is intended for.
The latest version can be found in the GetServiceAccount response.
"""
async_operation_id: builtins.str
"""The ID to use for this async operation - optional."""
def __init__(
self,
*,
service_account_id: builtins.str = ...,
namespace: builtins.str = ...,
access: temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess
| None = ...,
resource_version: builtins.str = ...,
async_operation_id: builtins.str = ...,
) -> None: ...
def HasField(
self, field_name: typing_extensions.Literal["access", b"access"]
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"access",
b"access",
"async_operation_id",
b"async_operation_id",
"namespace",
b"namespace",
"resource_version",
b"resource_version",
"service_account_id",
b"service_account_id",
],
) -> None: ...

global___SetServiceAccountNamespaceAccessRequest = (
SetServiceAccountNamespaceAccessRequest
)

class SetServiceAccountNamespaceAccessResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

ASYNC_OPERATION_FIELD_NUMBER: builtins.int
@property
def async_operation(
self,
) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation:
"""The async operation."""
def __init__(
self,
*,
async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation
| None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal["async_operation", b"async_operation"],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal["async_operation", b"async_operation"],
) -> None: ...

global___SetServiceAccountNamespaceAccessResponse = (
SetServiceAccountNamespaceAccessResponse
)

class DeleteServiceAccountRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand Down Expand Up @@ -3605,3 +3687,33 @@ class DeleteConnectivityRuleResponse(google.protobuf.message.Message):
) -> None: ...

global___DeleteConnectivityRuleResponse = DeleteConnectivityRuleResponse

class ValidateAccountAuditLogSinkRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

SPEC_FIELD_NUMBER: builtins.int
@property
def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec:
"""The audit log sink spec that will be validated"""
def __init__(
self,
*,
spec: temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec | None = ...,
) -> None: ...
def HasField(
self, field_name: typing_extensions.Literal["spec", b"spec"]
) -> builtins.bool: ...
def ClearField(
self, field_name: typing_extensions.Literal["spec", b"spec"]
) -> None: ...

global___ValidateAccountAuditLogSinkRequest = ValidateAccountAuditLogSinkRequest

class ValidateAccountAuditLogSinkResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

def __init__(
self,
) -> None: ...

global___ValidateAccountAuditLogSinkResponse = ValidateAccountAuditLogSinkResponse
Loading
Loading