Temporal is an execution service, serving jobs orchestration, see alternatives.
The binaries are being built in go/louhi and the source codes are pulled from the individual releases.
There are three binaries:
The CLI tool to admin the service:
bazelisk run //temporal:temporal-cli --
This assumes the service is running locally at port 7233.
The Web UI frontend to inspect the service.
Note that these instructions use the pinpoint workflows, namespace, and task queue as examples. The default dev task queue is localhost.dev. The namespace is perf-internal.
Follow these steps to test local changes. You need to redo steps 3-5 if you want to run your latest local changes.
./kube/attach.sh skia-infra-public-dev
kubectl port-forward service/temporal --address 0.0.0.0 -n temporal 7233:7233
bazelisk run //pinpoint/go/workflows/worker -- --namespace perf-internal
sample/main.go
bazelisk run //pinpoint/go/workflows/sample -- --namespace=perf-internal --[flag]=true
After results expire from the landing page, you can view results from the archival page
You cannot test local changes this way. These steps are for testing things that can only be tested in prod.
grants add --wait_for_twosync --reason="b/XYZ -- justification" skia-infra-breakglass-policy:2h
./kube/attach.sh skia-infra-corp
./kube/attach.sh skia-infra-public
kubectl port-forward service/temporal --address 0.0.0.0 -n temporal 7233:7233
sample/sample.go
bazelisk run //pinpoint/go/workflows/sample -- --namespace=perf-internal --taskQueue=perf.perf-chrome-public.bisect --[flag_for_workflow i.e. bisect]=true
Notes:
grants add --wait_for_twosync --reason="b/XYZ -- justification" skia-infra-breakglass-policy:2h
./kube/attach.sh [name of cluster i.e. skia-infra-corp]
kubectl port-forward service/temporal --address 0.0.0.0 -n temporal 7233:7233
bazelisk run @com_github_temporal_cli//:temporal-bins/temporal -- operator namespace create --retention=[duration] --history-archival-state=enabled --visibility-archival-state=enabled [name of namespace]
Where the retention is how long the workflow shows up in history. The default is 72 hours.
For updating name spaces, follow the instructions above to connect to the cluster.
// to get help bazelisk run @com_github_temporal_cli//:temporal-bins/temporal -- operator namespace update -h // updating the retention period bazelisk run @com_github_temporal_cli//:temporal-bins/temporal -- operator namespace update --retention [duration] [namespace name]
Temporal workflows uses event history replay to ensure that any changes to a workflow will not break any existing running workflow (called non-determinism error). Proper versioning is required to avoid non-determinism errors and replay unit tests confirm versioning is successful without deploying the change to production or running the workflow in real time.
Here is how to download the event history from a temporal workflow:
On a given temporal workflow page, you can download the event history by clicking the Download
button to the right of the Event History
header. Disable Decode Event History
.
This method is the fastest way to get the event history. This method may break if there is a version incompatibility between the temporal UI and the server. If this occurs, either upgrade temporal until they are both compatible or try the command line method.
bazelisk run //temporal:temporal-cli -- workflow show -w <workflow-id> -n <namespace> -o json > <filename>
You should see the event history in <filename>
.
Please ask the team to add you to https://chrome-infra-auth.appspot.com/auth/groups/project-chromeperf-admins.
The catapult post request failed with status code 500
Only applies to running the Pinpoint catapult bisect workflow on the local dev environment.
All parameters must be exportable for golang to serialize the parameter into a temporal workflow or activity. i.e.
type example struct { key string } param := example{ key: "value" } workflow.ExecuteActivity(ctx, FooActivity, param)
param
will be empty.