Skip to content

Commit 7115bf3

Browse files
committed
chore: Migrate to Obelisk 0.25.0
1 parent a274d8c commit 7115bf3

7 files changed

Lines changed: 73 additions & 36 deletions

File tree

dev-deps.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ cargo-expand 1.0.116
33
cargo-insta 1.43.2
44
cargo-nextest 0.9.103
55
just 1.42.4
6-
obelisk 0.24.2
6+
obelisk 0.25.0
77
pkg-config 0.29.2
8-
rustc 1.89.0 (29483883e 2025-08-04)
8+
rustc 1.90.0 (1159e78c4 2025-09-14)
99
wasm-tools 1.239.0
1010
wasmtime 36.0.2
1111
ldd (GNU libc) 2.40

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.89"
2+
channel = "1.90"
33
targets = ["wasm32-unknown-unknown", "wasm32-wasip2"]
44
components = ["rustfmt", "clippy", "rust-src", "rust-analyzer", "cargo"]

workflow/deployer-workflow/impl-flyio/wit/deps/obelisk_types@2.0.0/types@2.0.0.wit renamed to workflow/deployer-workflow/impl-flyio/wit/deps/obelisk_types@3.0.0/types.wit

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
package obelisk:types@2.0.0;
1+
package obelisk:types@3.0.0;
22

3+
@since(version = 3.0.0)
34
interface time {
45

6+
@since(version = 3.0.0)
57
variant duration {
68
milliseconds(u64),
79
seconds(u64),
@@ -12,47 +14,54 @@ interface time {
1214

1315
/// A time and date in seconds plus nanoseconds.
1416
// Extracted from wasi:clocks@0.2.0 to avoid dependency on wasi:io
17+
@since(version = 3.0.0)
1518
record datetime {
1619
seconds: u64,
1720
nanoseconds: u32,
1821
}
1922

23+
@since(version = 3.0.0)
2024
variant schedule-at {
2125
now,
2226
at(datetime),
2327
in(duration),
2428
}
2529
}
2630

31+
@since(version = 3.0.0)
2732
interface execution {
2833

29-
resource join-set-id {
34+
/// Join set resouce.
35+
@since(version = 3.0.0)
36+
resource join-set {
37+
@since(version = 3.0.0)
3038
id: func() -> string;
3139
}
3240

41+
@since(version = 3.0.0)
3342
record execution-id {
3443
id: string,
3544
}
3645

46+
@since(version = 3.0.0)
3747
record delay-id {
3848
id: string,
3949
}
4050

41-
record execution-failed {
42-
execution-id: execution-id,
43-
}
44-
51+
@since(version = 3.0.0)
4552
record function {
4653
// `namespace:pkg_name/ifc_name` or `namespace:pkg_name/ifc_name@version`
4754
interface-name: string,
4855
function-name: string,
4956
}
5057

58+
@since(version = 3.0.0)
5159
variant response-id {
5260
execution-id(execution-id),
5361
delay-id(delay-id),
5462
}
5563

64+
@since(version = 3.0.0)
5665
record function-mismatch {
5766
/// Workflow requested function
5867
specified-function: function,
@@ -62,20 +71,18 @@ interface execution {
6271
}
6372

6473
/// Error that is thrown by `-await-next` extension functions.
74+
@since(version = 3.0.0)
6575
variant await-next-extension-error {
66-
/// Execution response was awaited and marked as processed, but it finished with an error.
67-
execution-failed(execution-failed),
6876
/// All submitted requests and their responses of specified function and join set were already processed.
6977
all-processed,
7078
/// Execution response was awaited and marked as processed, but it belongs to a different function.
7179
/// This can happen when join set contains responses of multiple functions or delay requests.
7280
function-mismatch(function-mismatch),
7381
}
7482

75-
/// Error that is thrown by `-get` extension functions.
83+
/// Error variants that may occur when calling `-get` extension functions.
84+
@since(version = 3.0.0)
7685
variant get-extension-error {
77-
/// Execution is found in processed responses, but it finished with an error.
78-
execution-failed(execution-failed),
7986
/// Execution is found in processed responses, but it belongs to a different function.
8087
/// This can happen when join set contains responses of multiple functions.
8188
function-mismatch(function-mismatch),
@@ -85,6 +92,14 @@ interface execution {
8592
not-found-in-processed-responses,
8693
}
8794

95+
/// Error variants that may occur when calling `-invoke` extension functions.
96+
@since(version = 3.0.0)
97+
variant invoke-extension-error {
98+
invalid-name(string),
99+
}
100+
101+
/// Error variants that may occur when calling `-stub` extension functions.
102+
@since(version = 3.0.0)
88103
variant stub-error {
89104
/// Conflict can happen when a second writer attempts to stub a value, while the
90105
/// value is not equal to the already stubbed value.

workflow/deployer-workflow/impl-flyio/wit/deps/obelisk_workflow@2.0.0/workflow-support@2.0.0.wit renamed to workflow/deployer-workflow/impl-flyio/wit/deps/obelisk_workflow@3.0.0/workflow-support.wit

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
package obelisk:workflow@2.0.0;
1+
package obelisk:workflow@3.0.0;
22

3+
@since(version = 3.0.0)
34
interface workflow-support {
4-
use obelisk:types/time@2.0.0.{schedule-at};
5-
use obelisk:types/execution@2.0.0.{join-set-id, delay-id, execution-id, response-id};
5+
use obelisk:types/time@3.0.0.{schedule-at, datetime};
6+
use obelisk:types/execution@3.0.0.{join-set, delay-id, execution-id, response-id};
67

78
/// The closing strategy of a join set. Join sets are closed when execution finishes.
9+
@since(version = 3.0.0)
810
enum closing-strategy {
911
/// All submitted child execution requests that were not awaited by the workflow are awaited during join set close.
1012
/// Delay requests are not awaited.
@@ -14,42 +16,60 @@ interface workflow-support {
1416
// TODO: Implement cancel
1517
}
1618

19+
/// Error variants that may occur on named join set creation.
20+
@since(version = 3.0.0)
1721
variant join-set-create-error {
1822
conflict,
1923
invalid-name(string),
2024
}
2125

22-
2326
/// Returns a random u64 in the range [min, max).
27+
@since(version = 3.0.0)
2428
random-u64: func(min: u64, max-exclusive: u64) -> u64;
2529
/// Returns a random u64 in the range [min, max].
30+
@since(version = 3.0.0)
2631
random-u64-inclusive: func(min: u64, max-inclusive: u64) -> u64;
2732

2833
/// Returns a random string with a length in the range [min_length, max_length).
2934
/// The string consists only of alphanumeric characters (lowercase and uppercase letters, digits).
35+
@since(version = 3.0.0)
3036
random-string: func(min-length: u16, max-length-exclusive: u16) -> string;
3137

32-
/// Block execution for given time.
33-
sleep: func(schedule-at: schedule-at);
38+
/// Block execution for given time, return `schedule-at` resolved to time when the execution is scheduled.
39+
@since(version = 3.0.0)
40+
sleep: func(schedule-at: schedule-at) -> datetime;
3441

3542
/// Submit a delay request to the join set. The delay can be later polled using `join-next`.
36-
submit-delay: func(join-set-id: borrow<join-set-id>, timeout: schedule-at) -> delay-id;
43+
@since(version = 3.0.0)
44+
submit-delay: func(join-set: borrow<join-set>, timeout: schedule-at) -> delay-id;
3745

3846
/// Create a new completing join set.
39-
new-join-set-named: func(name: string, closing-strategy: closing-strategy) -> result<join-set-id, join-set-create-error>;
47+
@since(version = 3.0.0)
48+
new-join-set-named: func(name: string, closing-strategy: closing-strategy) -> result<join-set, join-set-create-error>;
4049

4150
/// Create a new completing join set with a generated name.
42-
new-join-set-generated: func(closing-strategy: closing-strategy) -> join-set-id;
51+
@since(version = 3.0.0)
52+
new-join-set-generated: func(closing-strategy: closing-strategy) -> join-set;
4353

54+
/// Error variants that may occur when calling `join-next` function.
55+
@since(version = 3.0.0)
4456
variant join-next-error {
4557
/// All submitted requests and their responses were already processed.
4658
all-processed,
4759
}
60+
61+
/// Explicitly close join set. All executions that were submitted and not awaited,
62+
/// in other words executions with unprocessed responses, will be either
63+
/// awaited or cancelled based on `closing-strategy`.
64+
/// Extension function `-get` can be used to lookup the execution result.
65+
@since(version = 3.0.0)
66+
close: func(join-set: join-set);
67+
4868
/// Block the workflow execution until next response associated with the join set arrives.
4969
/// The response is marked as processed.
5070
/// Child execution result can be obtained using `-get` extension function using the
5171
/// returned execution ID.
52-
/// Return `none` if the join set has all requests matched with responses.
53-
join-next: func(join-set-id: borrow<join-set-id>) ->
54-
result<response-id, join-next-error>;
72+
/// Return `join-next-error::all-processed` if the join set has all requests matched with responses.
73+
@since(version = 3.0.0)
74+
join-next: func(join-set: borrow<join-set>) -> result<response-id, join-next-error>;
5575
}

workflow/deployer-workflow/impl-flyio/wit/impl.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ world any {
66
import obelisk-flyio:activity-fly-http/apps@1.0.0-beta;
77
import obelisk-flyio:activity-fly-http/machines@1.0.0-beta;
88
import obelisk-flyio:activity-fly-http/volumes@1.0.0-beta;
9-
import obelisk:workflow/workflow-support@2.0.0;
9+
import obelisk:workflow/workflow-support@3.0.0;
1010
}

workflow/deployer-workflow/wit/obelisk-flyio_workflow@1.0.0-beta/workflow.wit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ interface workflow {
6363
cleanup-ok(app-init-modify-error),
6464
cleanup-failed(app-cleanup-failed),
6565
cleanup-skipped(app-init-modify-error),
66+
execution-failure,
6667
}
6768

6869
variant serve-error {
6970
vm-start-error(string),
7071
healthcheck-error(string),
72+
execution-failure,
7173
}
7274

7375
/// Chcek whether the app_name exists. If it does, return app-name-conflict.

0 commit comments

Comments
 (0)