Conversation
feature: introduce compute config Introduces a new `compute.v1` package of proto messages that house the various instructions and information needed by worker control plane controllers `temporal.api.compute.v1.ComputeConfig` has three fields, `task_queues`, `provider` and `scaler` that store the configuration information for the server-owned worker setup and how the worker control plane should treat worker lifecycle events (such as when no pollers exist for a task queue that has received a task). The `temporal.api.compute.v1.ComputeConfig.task_queues` field is a list of task queue name and task type tuples. When Temporal Server receives a task with any of these name+type combinations and finds no active pollers, it will trigger a launch of a server-owned Worker using the configuration information in the `provider` field. The `temporal.api.compute.v1.ComputeConfig.provider` field is of type `temporal.api.compute.v1.ComputeProvider`. This message is a simple wrapper around a blob of bytes that contains configuration settings for a worker control plane controller. The configuration settings for the worker control plane controller are specific to different compute providers. The first compute provider we are modeling is AWS Lambda, and the `ProviderDetailAWSLambda` message houses the ARN of the AWS Lambda Function to be invoked and an optional ARN of the IAM Role that should be assumed by a worker control plane controller when invoking the function. The `temporal.api.compute.v1.ComputeConfig.scaler` field is of type `temporal.api.compute.v1.ComputeScaler`. This message contains instructions for when the worker lifecycle controller should scale up or down the number of workers in a WorkerDeployment or WorkerDeploymentVersion. Adds a new field `compute_config` to `WorkerDeploymentInfo` and `WorkerDeploymentVersionInfo` that contains a `temporal.api.compute.v1.ComputeConfig` message. Both WorkerDeployment and WorkerDeploymentVersion have this field in order to handle versioned workers properly. For example, if the user wants to use PINNED temporal versioning, they will be creating a WorkerDeploymentVersion that is specific to, say, a qualified Lambda Function ARN. Therefore we need to place compute provider configuration on a WorkerDeploymentVersion in addition to WorkerDeployment. Adds three new gRPC API methods to WorkflowService: * `CreateWorkerDeployment` creates a new WorkerDeployment containing the supplied compute configuration. * `UpdateWorkerDeploymentComputeConfig` updates an existing WorkerDeployment's compute configuration. * `UpdateWorkerDeploymentComputeConfig` updates an existing WorkerDeploymentVersion's compute configuration. Signed-off-by: Jay Pipes <jay.pipes@temporal.io> Signed-off-by: Jay Pipes <jay.pipes@temporal.io>
* origin/master: Add Principal to the base HistoryEvent (#733)
…nfig and enable per-task-type compute providers (#731) **What changed?** * Enables validating, creating and updating compute providers at the worker deployment version level, as that is where it at the most basic belongs * Making the scaler config more flexible to allow for pluggable scalers * Allowing for different compute providers depending on task types and regions
|
|
||
| gh workflow run update-proto.yml -R https://github.com/temporalio/api-go \ | ||
| -r master \ | ||
| -r "${BRANCH}" \ |
There was a problem hiding this comment.
This causes the api-go's update-proto.yml be loaded from the branch on which we trigger the update, not from master all the time.
Makefile
Outdated
|
|
||
| PROTO_ROOT := . | ||
| PROTO_FILES = $(shell find temporal -name "*.proto") | ||
| PROTO_FILES = $(shell find temporal -name "*.proto" -not -name "*.swp") |
There was a problem hiding this comment.
@jaypipes what this change do? should we merge it to master?
There was a problem hiding this comment.
@ShahabT heh, this was for those of us who use Vi(m)... when Vim has a file open, it creates a .swp file, and the make generate Make target was picking up those temporary files.
There was a problem hiding this comment.
I highly recommend using set dir^=~/.local/tmp// in vimrc to keep swap files outside of source dirs. We shouldn't have to clutter our code to exclude editor temp files for all different editors.
There was a problem hiding this comment.
I highly recommend using
set dir^=~/.local/tmp//in vimrc to keep swap files outside of source dirs. We shouldn't have to clutter our code to exclude editor temp files for all different editors.
ack. even though there's already VSCode and Emacs stuff in .gitignore.
There was a problem hiding this comment.
|
Semgrep found 1 No explicit |
temporal/api/common/v1/message.proto
Outdated
| string name = 1; | ||
| } | ||
|
|
||
| // Uniquely identifies a combination of task queue name and type. |
There was a problem hiding this comment.
we didn't endup using it.
Sushisource
left a comment
There was a problem hiding this comment.
Nothing blocking but some comment fixes that should definitely be applied &/or added
| // converter to ensure the server can understand it. | ||
| // For remote-implemented scalers, you might use your own content | ||
| // converters according to what the remote endpoints understand. | ||
| temporal.api.common.v1.Payload details = 2; |
There was a problem hiding this comment.
IMO It would make sense for this field to be a oneof with our built-in providers as well-defined messages.
There was a problem hiding this comment.
@Sushisource that's what my original proposal had but I was asked to make it a Payload.
| // True if the server supports server-scaled deployments. | ||
| // This flag is dependent both on server version and for server-scaled deployments | ||
| // to be enabled via server configuration. | ||
| bool server_scaled_deployments = 12; |
There was a problem hiding this comment.
Who's this meant to be read by? If it's useful for SDK, this should go in namespace capabilities since that's what we call on startup. At least for what I've done so far, I don't need this, so maybe that's fine, but the principle applies to clients generally.
There was a problem hiding this comment.
This is added for UI.
| map<string, temporal.api.compute.v1.ComputeConfigScalingGroupUpdate> compute_config_scaling_groups = 6; | ||
|
|
||
| // Optional. Contains the compute config scaling groups to remove from the Worker Deployment. | ||
| repeated string remove_compute_config_scaling_groups = 7; |
There was a problem hiding this comment.
What're the semantics if the same string is used in both add and remove?
There was a problem hiding this comment.
@02strich to clarify the behavior. (I guess delete will take effect)
Co-authored-by: Spencer Judge <sjudge@hey.com>
This PR merges the serverless branch into master.
Server PR to be sent shortly.