Skip to content
Open
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-13-00
2024-08-01-00
2 changes: 1 addition & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ deps:
- buf.build/googleapis/googleapis
breaking:
use:
- FILE
- WIRE
lint:
use:
- DEFAULT
65 changes: 64 additions & 1 deletion temporal/api/cloud/cloudservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,66 @@ message GetRegionResponse {
temporal.api.cloud.region.v1.Region region = 1;
}

message GetSearchAttributesRequest {
// The namespace to get search attributes for.
string namespace = 1;
// The requested size of the page to retrieve - optional.
// Cannot exceed 1000. Defaults to 100.
int32 page_size = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the desire to match other pagination here, but I can't see a world where so many search attributes would come back where pagination would be needed. And then if we accept that you'll always get the full set of search attributes on every call, it is much easier on users if search attributes are a map.

Having said that, I am ok with this too, just wanted to bring it up.

// The page token if this is continuing from another response - optional.
string page_token = 3;
}

message GetSearchAttributesResponse {
// The list of search attributes in ascending name order.
repeated temporal.api.cloud.namespace.v1.SearchAttribute search_attributes = 1;
// The next page's token.
string next_page_token = 2;
}

message GetSearchAttributeRequest {
// The namespace to get the search attribute for.
string namespace = 1;
// The name of the search attribute to get.
string name = 2;
}

message GetSearchAttributeResponse {
// The search attribute.
temporal.api.cloud.namespace.v1.SearchAttribute search_attribute = 1;
}

message AddSearchAttributeRequest {
// The namespace to add the search attribute to.
string namespace = 1;
// The search attribute to add.
temporal.api.cloud.namespace.v1.SearchAttributeSpec spec = 2;
// The id to use for this async operation - optional.
string async_operation_id = 3;
}

message AddSearchAttributeResponse {
// The name of the search attribute that was added.
string name = 1;
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 2;
}

message RenameSearchAttributeRequest {
// The namespace to rename the search attribute for.
string namespace = 1;
// The name of the existing search attribute to be renamed.
string name = 2;
// The new name of the search attribute.
string new_name = 3;
// The id to use for this async operation - optional.
string async_operation_id = 5;
}

message RenameSearchAttributeResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message GetApiKeysRequest {
// The requested size of the page to retrieve - optional.
Expand All @@ -280,7 +340,10 @@ message GetApiKeysRequest {
string owner_id = 3;
// Filter api keys by owner type - optional.
// Possible values: user, service-account
string owner_type = 4;
string owner_type_deprecated = 4 [deprecated = true];
// Filter api keys by owner type - optional.
// temporal:enums:replaces=owner_type_deprecated
temporal.api.cloud.identity.v1.OwnerType owner_type = 5;
}

message GetApiKeysResponse {
Expand Down
31 changes: 31 additions & 0 deletions temporal/api/cloud/cloudservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,43 @@ service CloudService {
}

// Rename an existing customer search attribute
// Deprecated: Use RenameSearchAttribute instead
rpc RenameCustomSearchAttribute (RenameCustomSearchAttributeRequest) returns (RenameCustomSearchAttributeResponse) {
option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/rename-custom-search-attribute",
body: "*"
};
}

// Get all search attributes registered for a namespace.
rpc GetSearchAttributes (GetSearchAttributesRequest) returns (GetSearchAttributesResponse) {
option (google.api.http) = {
get: "/cloud/namespaces/{namespace}/search-attributes",
};
}

// Get a search attribute registered for a namespace.
rpc GetSearchAttribute (GetSearchAttributeRequest) returns (GetSearchAttributeResponse) {
option (google.api.http) = {
get: "/cloud/namespaces/{namespace}/search-attribute/{name}",
};
}

// Add a new search attribute to a namespace.
rpc AddSearchAttribute(AddSearchAttributeRequest) returns (AddSearchAttributeResponse) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rpc AddSearchAttribute(AddSearchAttributeRequest) returns (AddSearchAttributeResponse) {
rpc AddSearchAttribute (AddSearchAttributeRequest) returns (AddSearchAttributeResponse) {

This spacing is inconsistent (throughout this file, I just haven't really mentioned it before)

option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/search-attributes",
body: "*"
};
}

// Rename an existing search attribute.
rpc RenameSearchAttribute (RenameSearchAttributeRequest) returns (RenameSearchAttributeResponse) {
option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/search-attribute/{name}/rename",
body: "*"
};
}

// Delete a namespace
rpc DeleteNamespace (DeleteNamespaceRequest) returns (DeleteNamespaceResponse) {
Expand Down
24 changes: 24 additions & 0 deletions temporal/api/cloud/common/v1/message.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

package temporal.api.cloud.common.v1;

option go_package = "go.temporal.io/api/cloud/common/v1;common";
option java_package = "io.temporal.api.cloud.common.v1";
option java_multiple_files = true;
option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Cloud::Common::V1";
option csharp_namespace = "Temporalio.Api.Cloud.Common.V1";


enum ResourceState {
RESOURCE_STATE_UNSPECIFIED = 0;
RESOURCE_STATE_ACTIVATING = 1; // The resource is being activated.
RESOURCE_STATE_ACTIVATION_FAILED = 2; // The resource failed to activate. This is an error state. Reach out to support for remediation.
RESOURCE_STATE_ACTIVE = 3; // The resource is active and ready to use.
RESOURCE_STATE_UPDATING = 4; // The resource is being updated.
RESOURCE_STATE_UPDATE_FAILED = 5; // The resource failed to update. This is an error state. Reach out to support for remediation.
RESOURCE_STATE_DELETING = 6; // The resource is being deleted.
RESOURCE_STATE_DELETE_FAILED = 7; // The resource failed to delete. This is an error state. Reach out to support for remediation.
RESOURCE_STATE_DELETED = 8; // The resource has been deleted.
RESOURCE_STATE_SUSPENDED = 9; // The resource is suspended and not available for use. Reach out to support for remediation.
}
73 changes: 63 additions & 10 deletions temporal/api/cloud/identity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,52 @@ option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Cloud::Identity::V1";
option csharp_namespace = "Temporalio.Api.Cloud.Identity.V1";

import "temporal/api/cloud/common/v1/message.proto";
import "google/protobuf/timestamp.proto";

message AccountAccess {
// The role on the account, should be one of [admin, developer, read]
// admin - gives full access the account, including users and namespaces
// developer - gives access to create namespaces on the account
// read - gives read only access to the account
string role = 1;
// Deprecated: Use role field instead.
string role_deprecated = 1 [deprecated = true];
// The role on the account.
// temporal:enums:replaces=role_deprecated
Role role = 2;

enum Role {
ROLE_UNSPECIFIED = 0;
ROLE_ADMIN = 1; // Gives full access to the account, including users and namespaces.
ROLE_DEVELOPER = 2; // Gives access to create namespaces on the account.
ROLE_READ = 3; // Gives read only access to the account.
}
}

message NamespaceAccess {
// The permission to the namespace, should be one of [admin, write, read]
// admin - gives full access to the namespace, including assigning namespace access to other users
// write - gives write access to the namespace configuration and workflows within the namespace
// read - gives read only access to the namespace configuration and workflows within the namespace
string permission = 1;
// Deprecated: Use permission field instead.
string permission_deprecated = 1 [deprecated = true];

// The permission to the namespace.
// temporal:enums:replaces=permission_deprecated
Permission permission = 2;

enum Permission {
PERMISSION_UNSPECIFIED = 0;
PERMISSION_ADMIN = 1; // Gives full access to the namespace, including assigning namespace access to other users.
PERMISSION_WRITE = 2; // Gives write access to the namespace configuration and workflows within the namespace.
PERMISSION_READ = 3; // Gives read only access to the namespace configuration and workflows within the namespace.
}
}

enum OwnerType {
OWNER_TYPE_UNSPECIFIED = 0;
OWNER_TYPE_USER = 1; // The owner is a user.
OWNER_TYPE_SERVICE_ACCOUNT = 2; // The owner is a service account.
}

message Access {
Expand Down Expand Up @@ -58,7 +88,12 @@ message User {
// The user specification
UserSpec spec = 3;
// The current state of the user
string state = 4;
// Deprecated: Use state field instead.
string state_deprecated = 4 [deprecated = true];
// The current state of the user.
// For any failed state, reach out to Temporal Cloud support for remediation.
// temporal:enums:replaces=state_deprecated
temporal.api.cloud.common.v1.ResourceState state = 9;
// The id of the async operation that is creating/updating/deleting the user, if any
string async_operation_id = 5;
// The details of the open invitation sent to the user, if any
Expand Down Expand Up @@ -94,8 +129,13 @@ message UserGroup {
string resource_version = 2;
// The group specification
UserGroupSpec spec = 3;
// The current state of the group
string state = 4;
// The current state of the group.
// Deprecated: Use state field instead.
string state_deprecated = 4 [deprecated = true];
// The current state of the group.
// For any failed state, reach out to Temporal Cloud support for remediation.
// temporal:enums:replaces=state_deprecated
temporal.api.cloud.common.v1.ResourceState state = 8;
// The id of the async operation that is creating/updating/deleting the group, if any
string async_operation_id = 5;
// The date and time when the group was created
Expand All @@ -116,7 +156,12 @@ message ServiceAccount {
// The current state of the service account.
// Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended.
// For any failed state, reach out to Temporal Cloud support for remediation.
string state = 4;
// Deprecated: Use state field instead.
string state_deprecated = 4 [deprecated = true];
// The current state of the service account.
// For any failed state, reach out to Temporal Cloud support for remediation.
// temporal:enums:replaces=state_deprecated
temporal.api.cloud.common.v1.ResourceState state = 8;
// The id of the async operation that is creating/updating/deleting the service account, if any.
string async_operation_id = 5;
// The date and time when the service account was created.
Expand Down Expand Up @@ -150,7 +195,11 @@ message ApiKey {
// The current state of the API key.
// Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended.
// For any failed state, reach out to Temporal Cloud support for remediation.
string state = 4;
// Deprecated: Use state field instead.
string state_deprecated = 4 [deprecated = true];
// The current state of the API key.
// temporal:enums:replaces=state_deprecated
temporal.api.cloud.common.v1.ResourceState state = 8;
// The id of the async operation that is creating/updating/deleting the API key, if any.
string async_operation_id = 5;
// The date and time when the API key was created.
Expand All @@ -163,13 +212,17 @@ message ApiKey {
message ApiKeySpec {
// The id of the owner to create the API key for.
// The owner id is immutable. Once set during creation, it cannot be changed.
// The owner id is the id of the user when the owner type is 'user'.
// The owner id is the id of the service account when the owner type is 'service-account'.
// The owner id is the id of the user when the owner type is user.
// The owner id is the id of the service account when the owner type is service account.
string owner_id = 1;
// The type of the owner to create the API key for.
// The owner type is immutable. Once set during creation, it cannot be changed.
// Possible values: user, service-account.
string owner_type = 2;
// Deprecated: Use owner_type field instead.
string owner_type_deprecated = 2 [deprecated = true];
// The type of the owner to create the API key for.
// temporal:enums:replaces=owner_type_deprecated
OwnerType owner_type = 7;
// The display name of the API key.
string display_name = 3;
// The description of the API key.
Expand Down
68 changes: 65 additions & 3 deletions temporal/api/cloud/namespace/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Cloud::Namespace::V1";
option csharp_namespace = "Temporalio.Api.Cloud.Namespace.V1";

import "temporal/api/cloud/common/v1/message.proto";
import "google/protobuf/timestamp.proto";

message CertificateFilterSpec {
Expand Down Expand Up @@ -87,7 +88,9 @@ message NamespaceSpec {
// Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list.
// NOTE: currently deleting a search attribute is not supported.
// Optional, default is empty.
map<string, string> custom_search_attributes = 5;
// Deprecated: Use the AddSearchAttribute, RenameSearchAttribute operations instead to manage search attributes.
// temporal:versioning:max_version=2024-05-13-00
map<string, string> custom_search_attributes = 5 [deprecated = true];
// Codec server spec used by UI to decode payloads for all users interacting with this namespace.
// Optional, default is unset.
CodecServerSpec codec_server = 6;
Expand Down Expand Up @@ -133,7 +136,12 @@ message Namespace {
// The namespace specification.
NamespaceSpec spec = 3;
// The current state of the namespace.
string state = 4;
// Deprecated: Use state instead.
string state_deprecated = 4 [deprecated = true];
// The current state of the namespace.
// For any failed state, reach out to Temporal Cloud support for remediation.
// temporal:enums:replaces=state_deprecated
temporal.api.cloud.common.v1.ResourceState state = 13;
// The id of the async operation that is creating/updating/deleting the namespace, if any.
string async_operation_id = 5;
// The endpoints for the namespace.
Expand All @@ -158,7 +166,61 @@ message NamespaceRegionStatus {
// The current state of the namespace region.
// Possible values: adding, active, passive, removing, failed.
// For any failed state, reach out to Temporal Cloud support for remediation.
string state = 1;
// Deprecated: Use state instead.
string state_deprecated = 1 [deprecated = true];
// The current state of the namespace region.
// temporal:enums:replaces=state_deprecated
State state = 3;
// The id of the async operation that is making changes to where the namespace is available, if any.
string async_operation_id = 2;

enum State {
STATE_UNSPECIFIED = 0;
STATE_ADDING= 1; // The region is being added to the namespace.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this enum seem unrelated to the current PR, is it intentional?

STATE_ACTIVE= 2; // The namespace is active in this region.
Comment on lines +179 to +180
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
STATE_ADDING= 1; // The region is being added to the namespace.
STATE_ACTIVE= 2; // The namespace is active in this region.
STATE_ADDING = 1; // The region is being added to the namespace.
STATE_ACTIVE = 2; // The namespace is active in this region.

STATE_PASSIVE = 3; // The namespace is passive in this region.
STATE_REMOVING = 4; // The region is being removed from the namespace.
STATE_FAILED = 5; // The region failed to be added/removed, check failure_reason in the last async_operation status for more details.
}
}

message SearchAttributeSpec {
// The name of the search attribute.
// Once created, the name can be changed using the RenameSearchAttribute operation.
string name = 1;
// The type of the search attribute.
// The type of the search attribute cannot be changed once set.
SearchAttributeType type = 2;

enum SearchAttributeType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are inconsistent with how you prefix your inner enums/types. You have SearchAttributeSpec.SearchAttributeType here and SearchAttribute.State below.

SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED = 0;
SEARCH_ATTRIBUTE_TYPE_TEXT = 1;
SEARCH_ATTRIBUTE_TYPE_KEYWORD = 2;
SEARCH_ATTRIBUTE_TYPE_INT = 3;
SEARCH_ATTRIBUTE_TYPE_DOUBLE = 4;
SEARCH_ATTRIBUTE_TYPE_BOOL = 5;
SEARCH_ATTRIBUTE_TYPE_DATETIME = 6;
SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST = 7;
}
}

message SearchAttribute {
// The search attribute specification.
SearchAttributeSpec spec = 1;
// Whether the search attribute is system defined.
// System defined search attributes cannot be modified or deleted.
bool system = 2;
// The current state of the search attribute.
State state = 3;
// The id of the async operation that is making changes to the search attribute, if any.
string async_operation_id = 4;

enum State {
STATE_UNSPECIFIED = 0;
STATE_ADDING = 1; // The search attribute is being added.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed in descriptor that trailing comments on the same line are treated as comments for the item same as if they are above, but I think it's more consistent to always put comments for a construct above the construct.

STATE_ADD_FAILED = 2; // The search attribute failed to be added, check failure_reason for more details.
STATE_READY = 3; // The search attribute is ready for use.
STATE_RENAMING = 4; // The search attribute is being renamed.
STATE_RENAME_FAILED = 5; // The search attribute failed to be renamed, check failure_reason for more details.
}
}
Loading