Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a78439e
Creating new UT, want to dedupe next
Sushisource Feb 9, 2021
79495e6
Dedupe core response setup
Sushisource Feb 9, 2021
070f863
Response batch control
Sushisource Feb 9, 2021
ab685cc
Saving here while waiting for some feedback
Sushisource Feb 9, 2021
72327b9
Replay test works. Just need to do a bit of cleanup
Sushisource Feb 10, 2021
a29489e
Fix task token stuff
Sushisource Feb 10, 2021
4bf1703
Some refactoring to eliminate invalid states in workflow representation
Sushisource Feb 11, 2021
fed36fb
Make parallel timer integ test actually test two timers
Sushisource Feb 11, 2021
28a45bd
Merge branch 'master' into more-tests
Sushisource Feb 11, 2021
121977a
Clippy lints
Sushisource Feb 11, 2021
c03b304
Fix a todo
Sushisource Feb 11, 2021
7300cd6
Clean up uggo todos, it's clear we want to reduce test verbosity
Sushisource Feb 11, 2021
f722f3e
Fix merge problem in integ tests
Sushisource Feb 11, 2021
d59c394
Use separate task queues to enable running integ tests in parallel
Sushisource Feb 11, 2021
600e82b
Use explicit rust image version to avoid clippy inconsistencies
Sushisource Feb 12, 2021
e472fb3
CI server needs a bit more time to fire timers under test
Sushisource Feb 12, 2021
edc3254
Simplify timer fsm code before proceeding
Sushisource Feb 12, 2021
b7499e5
Ensure wf machines attaches full event to malformed details
Sushisource Feb 12, 2021
8e8aac6
Test for mismatched id error
Sushisource Feb 12, 2021
a2d7db7
Merge remote-tracking branch 'upstream/master' into cancellations
Sushisource Feb 12, 2021
d9d5167
Some various error enhancements
Sushisource Feb 13, 2021
5c7901f
Rename WorkflowTrigger -> MachineResponse
Sushisource Feb 16, 2021
e1f7627
Moving to desktop
Sushisource Feb 17, 2021
23b2f47
Most of the way there. Fixing deadlocks.
Sushisource Feb 17, 2021
0155521
Deadlocks are fixed!
Sushisource Feb 17, 2021
b23ae72
Some cleanup and UTs
Sushisource Feb 18, 2021
ace7a1c
Replace all unwraps with expectations
Sushisource Feb 18, 2021
2d171ba
Clean up unused warning
Sushisource Feb 18, 2021
75e3da4
Sensibly drop workflow managers when send side is dropped
Sushisource Feb 18, 2021
42feb9b
Extract function for dedicated thread
Sushisource Feb 18, 2021
139d43f
Function breakdown
Sushisource Feb 18, 2021
39f75ca
Fix busy looping
Sushisource Feb 18, 2021
e2566eb
Server is a bit inconsistent w/ timing in parallel timer test.
Sushisource Feb 18, 2021
bb97e12
Remove leftover temp RC variable
Sushisource Feb 18, 2021
fa15c49
Comment correction
Sushisource Feb 18, 2021
89c824b
Merge branch 'single-threaded-workflows' into cancellations
Sushisource Feb 18, 2021
8f1cb1b
Got things compiling with Rc but it's a mess
Sushisource Feb 19, 2021
1d8caaf
Merge branch 'master' into cancellations
Sushisource Feb 19, 2021
7e7b44a
Fixed exploding Rc, still a mess.
Sushisource Feb 19, 2021
0f4a32c
Incremental timer cancel UT is working
Sushisource Feb 19, 2021
fe41ba2
:tada: Working!
Sushisource Feb 19, 2021
8495c98
Fix errors and remove extra indirection in timer machine lookup
Sushisource Feb 23, 2021
6015f20
Fix tracing warnings
Sushisource Feb 23, 2021
98f4dc9
Clippy fixes
Sushisource Feb 23, 2021
6bc7bb1
Use slotmap instead of Rc<RefCell<>> stuff
Sushisource Feb 24, 2021
e577b3e
Merge branch 'master' into cancellations
Sushisource Feb 24, 2021
6653bfc
Add higher level test, dedupe replay testing stuff with rstest
Sushisource Feb 24, 2021
64b7527
Integration test
Sushisource Feb 24, 2021
6dcc989
Various cleanups
Sushisource Feb 24, 2021
eae5143
Merge branch 'master' into cancellations
Sushisource Feb 24, 2021
f688423
Use shutdown of workflow managers in core shutdown
Sushisource Feb 24, 2021
ce8600d
Remove probably unneeded todo
Sushisource Feb 24, 2021
a8cabe8
Dedupe histories in tests
Sushisource Feb 24, 2021
54e3216
Merge remote-tracking branch 'upstream/master' into cancellations
Sushisource Feb 24, 2021
68ca783
Fix up merge problems
Sushisource Feb 24, 2021
1e2f7c7
Add UT for cancelling before sending to server
Sushisource Feb 25, 2021
431064e
Add higher level & integ test. Need to fix hist ending w/ WECompleted
Sushisource Feb 25, 2021
b5b601c
Make history w/ workflow execution completed work for cancel b4 sent
Sushisource Feb 25, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Cargo.lock
# Ignore generated protobuf files
src/protos/*.rs
!src/protos/mod.rs
/tarpaulin-report.html
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ displaydoc = "0.1"
env_logger = "0.8"
futures = "0.3"
log = "0.4"
opentelemetry-jaeger = "0.10"
opentelemetry = "0.11.2"
once_cell = "1.5"
opentelemetry-jaeger = "0.11"
opentelemetry = "0.12"
prost = "0.7"
prost-types = "0.7"
slotmap = "1.0"
thiserror = "1.0"
tokio = { version = "1.1", features = ["rt", "rt-multi-thread"] }
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"
Expand Down
2 changes: 0 additions & 2 deletions fsm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ edition = "2018"
license-file = "LICENSE.txt"

[dependencies]
thiserror = "1.0"
derive_more = "0.99"
state_machine_procmacro = { path = "state_machine_procmacro" }
state_machine_trait = { path = "state_machine_trait" }
4 changes: 3 additions & 1 deletion fsm/state_machine_procmacro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ impl StateMachineDefinition {
.flat_map(|t| vec![t.from.clone(), t.to.clone()])
.collect();
let state_variants = states.iter().map(|s| {
let statestr = s.to_string();
quote! {
#[display(fmt=#statestr)]
#s(#s)
}
});
Expand All @@ -349,7 +351,7 @@ impl StateMachineDefinition {
}
};
let states_enum = quote! {
#[derive(::derive_more::From, Clone)]
#[derive(::derive_more::From, Clone, ::derive_more::Display)]
#visibility enum #state_enum_name {
#(#state_variants),*
}
Expand Down
14 changes: 10 additions & 4 deletions protos/local/core_interface.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ message WFActivationJob {
StartWorkflowTaskAttributes start_workflow = 1;
// A timer has fired, allowing whatever was waiting on it (if anything) to proceed
TimerFiredTaskAttributes timer_fired = 2;
// Workflow was reset. The randomness seed has to be updated.
RandomSeedUpdatedAttributes random_seed_updated = 3;
// A timer was canceled
TimerCanceledTaskAttributes timer_canceled = 3;
// Workflow was reset. The randomness seed must be updated.
RandomSeedUpdatedAttributes random_seed_updated = 4;

QueryWorkflowJob query_workflow = 4;
CancelWorkflowTaskAttributes cancel_workflow = 5;
QueryWorkflowJob query_workflow = 5;
CancelWorkflowTaskAttributes cancel_workflow = 6;
}
}

Expand All @@ -94,6 +96,10 @@ message TimerFiredTaskAttributes {
string timer_id = 1;
}

message TimerCanceledTaskAttributes {
string timer_id = 1;
}

message RandomSeedUpdatedAttributes {
uint64 randomness_seed = 1;
}
Expand Down
24 changes: 24 additions & 0 deletions src/core_tracing.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use once_cell::sync::OnceCell;
use opentelemetry_jaeger::Uninstall;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

static TRACING_INIT: OnceCell<Uninstall> = OnceCell::new();
const TRACING_ENABLE_ENV_VAR: &str = "TEMPORAL_CORE_TRACING";

pub(crate) fn tracing_init() {
let _ = env_logger::try_init();
if std::env::var(TRACING_ENABLE_ENV_VAR).is_ok() {
TRACING_INIT.get_or_init(|| {
let (tracer, uninstall) = opentelemetry_jaeger::new_pipeline()
.with_service_name("coresdk")
.install()
.unwrap();
let opentelemetry = tracing_opentelemetry::layer().with_tracer(tracer);
tracing_subscriber::registry()
.with(opentelemetry)
.try_init()
.unwrap();
uninstall
});
}
}
Loading