Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4809945
Use a local path to test patch
Sushisource Feb 3, 2021
f4de845
Adding integ test for pollers
vitarb Feb 3, 2021
2295983
Merge branch 'tonic-patch' into integ-test
Sushisource Feb 3, 2021
37cc9df
Server accepts request, hits timeout, but we get lame error
Sushisource Feb 3, 2021
4feb1a7
Avoid needing feature flag for integ testing
Sushisource Feb 3, 2021
2115683
Actually make test selection work how I wanted it to
Sushisource Feb 3, 2021
cd957ce
Adding integration test for the poller and made task queue configurable
Sushisource Feb 3, 2021
7cef27d
Fix build errors and add comments
vitarb Feb 4, 2021
47aba70
Create workflow in the integ test
vitarb Feb 4, 2021
0a92a79
Add end to end integ test for timer workflow
vitarb Feb 4, 2021
c6e7388
fix mocks in tests
vitarb Feb 4, 2021
74261ee
Adding integration test for the poller and made task queue configurable
Sushisource Feb 3, 2021
77fabbb
Fix build errors and add comments
vitarb Feb 4, 2021
b260f7d
Create workflow in the integ test
vitarb Feb 4, 2021
8ef4abd
Add end to end integ test for timer workflow
vitarb Feb 4, 2021
119410d
fix mocks in tests
vitarb Feb 4, 2021
fa10dae
Fix mockall compile problem
Sushisource Feb 4, 2021
ff5b1b3
Merge remote-tracking branch 'origin/integ-test' into integ-test
Sushisource Feb 4, 2021
c0da813
Fix mockall compile problem, actually send completions using block_on
Sushisource Feb 4, 2021
9d6a4c6
add event loop invocation into push_lang_commands
vitarb Feb 4, 2021
b5ca406
Merge remote-tracking branch 'origin/integ-test' into integ-test
Sushisource Feb 4, 2021
adbc67c
Cleanup linting errors and a handful of other issues
Sushisource Feb 4, 2021
a88b96e
More docstring / todo / visibility cleanup
Sushisource Feb 4, 2021
cbb4ab3
Address some of Max's feedback
Sushisource Feb 4, 2021
dec4a78
Bad merge meant we are running two sets of integ tests for some reason
Sushisource Feb 4, 2021
e38099c
Clean up a bunch of results that didn't need to exist. Better name/do…
Sushisource Feb 4, 2021
ed1c946
A few other bits of idiomaticizing
Sushisource Feb 4, 2021
69b27ac
Merge branch 'master' into integ-test
Sushisource Feb 4, 2021
4c75d17
Adding temporal service for integ tests
vitarb Feb 5, 2021
85ee66d
Specify endpoint for integ tests as docker doesn't see localhost
vitarb Feb 5, 2021
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
51 changes: 51 additions & 0 deletions .buildkite/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
version: '3.5'

services:
cassandra:
image: cassandra:3.11
logging:
driver: none
ports:
- "9042:9042"

statsd:
image: hopsoft/graphite-statsd
logging:
driver: none
ports:
- "8080:80"
- "2003:2003"
- "8125:8125"
- "8126:8126"

temporal:
image: temporalio/auto-setup:1.6.3
logging:
driver: none
ports:
- "7233:7233"
- "7234:7234"
- "7235:7235"
- "7239:7239"
- "6933:6933"
- "6934:6934"
- "6935:6935"
- "6939:6939"
environment:
- "CASSANDRA_SEEDS=cassandra"
- "STATSD_ENDPOINT=statsd:8125"
- "DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml"
depends_on:
- cassandra
- statsd

unit-test:
build:
context: ../../
Expand All @@ -12,3 +50,16 @@ services:
- "USER=unittest"
volumes:
- "../../:/sdk-core"

integ-test:
build:
context: ../../
dockerfile: .buildkite/docker/Dockerfile
command: /bin/sh -c ".buildkite/docker/build.sh"
environment:
- "USER=unittest"
- "TEMPORAL_SERVICE_ADDRESS=http://temporal:7233"
depends_on:
- temporal
volumes:
- "../../:/sdk-core"
10 changes: 10 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ steps:
- docker-compose#v3.0.0:
run: unit-test
config: .buildkite/docker/docker-compose.yaml
- label: "integ-test"
agents:
queue: "default"
docker: "*"
command: "cargo test --test integ_tests"
timeout_in_minutes: 15
plugins:
- docker-compose#v3.0.0:
run: integ-test
config: .buildkite/docker/docker-compose.yaml
- wait
17 changes: 15 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ prost = "0.7"
prost-types = "0.7"
thiserror = "1.0"
tokio = { version = "1.1", features = ["rt", "rt-multi-thread"] }
tonic = "0.4"
tracing = { version = "0.1", features = ["log"] }
tracing-opentelemetry = "0.10"
tracing-opentelemetry = "0.11"
tracing-subscriber = "0.2"
url = "2.2"
rand = "0.8.3"

[dependencies.tonic]
version = "0.4"
#path = "../tonic/tonic"
# Using our fork for now which fixes grpc-timeout header getting stripped
git = "https://github.com/temporalio/tonic"

[dependencies.rustfsm]
path = "fsm"
Expand All @@ -40,3 +46,10 @@ tonic-build = "0.4"

[workspace]
members = [".", "fsm"]

[[test]]
name = "integ_tests"
path = "tests/main.rs"
# Prevents autodiscovery, and hence these getting run with `cargo test`. Run with
# `cargo test --test integ_tests`
test = false
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Core SDK that can be used as a base for all other SDKs.
[![Build status](https://badge.buildkite.com/c23f47f4a827f04daece909963bd3a248496f0cdbabfbecee4.svg)](https://buildkite.com/temporal/core-sdk?branch=master)

Core SDK that can be used as a base for all other Temporal SDKs.

# Getting started
This repo uses a submodule for upstream protobuf files. The path `protos/api_upstream` is a
Expand Down
16 changes: 11 additions & 5 deletions protos/local/core_interface.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ import "temporal/api/query/v1/message.proto";

// A request as given to [crate::Core::poll_task]
message PollTaskReq {
// If true, poll for workflow tasks
bool workflows = 1;
// If true, poll for activity tasks
bool activities = 2;
// What type of task to poll for
enum TaskType {
// Poll for workflows
WORKFLOWS = 0;
// Poll for activities
ACTIVITIES = 1;
}

// A list of task types to poll for
repeated TaskType types = 1;
}

// An instruction to perform work from core->lang sdk
Expand All @@ -41,7 +47,7 @@ message Task {
// An instruction to the lang sdk to run some workflow code, whether for the first time or from
// a cached state.
message WFActivation {
// Time the activation(s) were requested
// The current time as understood by the workflow, which is set by workflow task started events
google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true];
// The id of the currently active run of the workflow
string run_id = 2;
Expand Down
Loading