From 0956ac0f4178616f75b304bf5192fd3a3f784bf4 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:00:49 +0200 Subject: [PATCH 01/12] Initial version of golem:api@1.1 with oplog enumeration --- wit/deps/golem/golem-host-1.1.wit | 264 +++++++++++++++++++++++++++++ wit/deps/golem/golem-oplog-1.1.wit | 238 ++++++++++++++++++++++++++ 2 files changed, 502 insertions(+) create mode 100644 wit/deps/golem/golem-host-1.1.wit create mode 100644 wit/deps/golem/golem-oplog-1.1.wit diff --git a/wit/deps/golem/golem-host-1.1.wit b/wit/deps/golem/golem-host-1.1.wit new file mode 100644 index 0000000..b439786 --- /dev/null +++ b/wit/deps/golem/golem-host-1.1.wit @@ -0,0 +1,264 @@ +// UNSTABLE API - WILL BE CHANGING UNTIL THE GOLEM 1.1 RELEASE +// +// BACKWARD COMPATIBILITY GUARANTEES ARE NOT APPLIED TO WORKERS USING THIS HOST INTERFACE + +package golem:api@1.1.0-rc1; + +/// The Golem host API provides low level access to Golem specific features such as promises and control over +/// the durability and transactional guarantees the executor provides. +interface host { + use golem:rpc/types@0.1.0.{uri}; + use wasi:clocks/monotonic-clock@0.2.0.{duration}; + + /// An index into the persistent log storing all performed operations of a worker + type oplog-index = u64; + + /// A promise ID is a value that can be passed to an external Golem API to complete that promise + /// from an arbitrary external source, while Golem workers can await for this completion. + record promise-id { + worker-id: worker-id, + oplog-idx: oplog-index, + } + + /// Represents a Golem worker + record worker-id { + component-id: component-id, + worker-name: string + } + + /// Represents a Golem component + record component-id { + uuid: uuid, + } + + /// Represents a Golem component's version + type component-version = u64; + + /// UUID + record uuid { + high-bits: u64, + low-bits: u64 + } + + /// Represents a Golem Cloud account + record account-id { + value: string + } + + /// Configures how the executor retries failures + record retry-policy { + /// The maximum number of retries before the worker becomes permanently failed + max-attempts: u32, + /// The minimum delay between retries (applied to the first retry) + min-delay: duration, + /// The maximum delay between retries + max-delay: duration, + /// Multiplier applied to the delay on each retry to implement exponential backoff + multiplier: f64, + /// The maximum amount of jitter to add to the delay + max-jitter-factory: option + } + + /// Configurable persistence level for workers + variant persistence-level { + persist-nothing, + persist-remote-side-effects, + smart + } + + /// Describes how to update a worker to a different component version + enum update-mode { + /// Automatic update tries to recover the worker using the new component version + /// and may fail if there is a divergence. + automatic, + + /// Manual, snapshot-based update uses a user-defined implementation of the `save-snapshot` interface + /// to store the worker's state, and a user-defined implementation of the `load-snapshot` interface to + /// load it into the new version. + snapshot-based + } + + enum filter-comparator { + equal, + not-equal, + greater-equal, + greater, + less-equal, + less + } + + enum string-filter-comparator { + equal, + not-equal, + like, + not-like + } + + enum worker-status { + /// The worker is running an invoked function + running, + /// The worker is ready to run an invoked function + idle, + /// An invocation is active but waiting for something (sleeping, waiting for a promise) + suspended, + /// The last invocation was interrupted but will be resumed + interrupted, + /// The last invocation failed and a retry was scheduled + retrying, + /// The last invocation failed and the worker can no longer be used + failed, + /// The worker exited after a successful invocation and can no longer be invoked + exited, + } + + record worker-name-filter { + comparator: string-filter-comparator, + value: string + } + + record worker-status-filter { + comparator: filter-comparator, + value: worker-status + } + + record worker-version-filter { + comparator: filter-comparator, + value: u64 + } + + record worker-created-at-filter { + comparator: filter-comparator, + value: u64 + } + + record worker-env-filter { + name: string, + comparator: string-filter-comparator, + value: string + } + + variant worker-property-filter { + name(worker-name-filter), + status(worker-status-filter), + version(worker-version-filter), + created-at(worker-created-at-filter), + env(worker-env-filter) + } + + record worker-all-filter { + filters: list + } + + record worker-any-filter { + filters: list + } + + record worker-metadata { + worker-id: worker-id, + args: list, + env: list>, + status: worker-status, + component-version: u64, + retry-count: u64 + } + + resource get-workers { + constructor(component-id: component-id, filter: option, precise: bool); + + get-next: func() -> option>; + } + + /// Create a new promise + create-promise: func() -> promise-id; + + /// Suspends execution until the given promise gets completed, and returns the payload passed to + /// the promise completion. + await-promise: func(promise-id: promise-id) -> list; + + /// Completes the given promise with the given payload. Returns true if the promise was completed, false + /// if the promise was already completed. The payload is passed to the worker that is awaiting the promise. + complete-promise: func(promise-id: promise-id, data: list) -> bool; + + /// Deletes the given promise + delete-promise: func(promise-id: promise-id) -> (); + + /// Returns the current position in the persistent op log + get-oplog-index: func() -> oplog-index; + + /// Makes the current worker travel back in time and continue execution from the given position in the persistent + /// op log. + set-oplog-index: func(oplog-idx: oplog-index) -> (); + + /// Blocks the execution until the oplog has been written to at least the specified number of replicas, + /// or the maximum number of replicas if the requested number is higher. + oplog-commit: func(replicas: u8) -> (); + + /// Marks the beginning of an atomic operation. + /// In case of a failure within the region selected by `mark-begin-operation` and `mark-end-operation` + /// the whole region will be reexecuted on retry. + /// The end of the region is when `mark-end-operation` is called with the returned oplog-index. + mark-begin-operation: func() -> oplog-index; + + /// Commits this atomic operation. After `mark-end-operation` is called for a given index, further calls + /// with the same parameter will do nothing. + mark-end-operation: func(begin: oplog-index) -> (); + + /// Gets the current retry policy associated with the worker + get-retry-policy: func() -> retry-policy; + + /// Overrides the current retry policy associated with the worker. Following this call, `get-retry-policy` will return the + /// new retry policy. + set-retry-policy: func(new-retry-policy: retry-policy) -> (); + + /// Gets the worker's current persistence level. + get-oplog-persistence-level: func() -> persistence-level; + + /// Sets the worker's current persistence level. This can increase the performance of execution in cases where durable + /// execution is not required. + set-oplog-persistence-level: func(new-persistence-level: persistence-level) -> (); + + /// Gets the current idempotence mode. See `set-idempotence-mode` for details. + get-idempotence-mode: func() -> bool; + + /// Sets the current idempotence mode. The default is true. + /// True means side-effects are treated idempotent and Golem guarantees at-least-once semantics. + /// In case of false the executor provides at-most-once semantics, failing the worker in case it is + /// not known if the side effect was already executed. + set-idempotence-mode: func(idempotent: bool) -> (); + + /// Generates an idempotency key. This operation will never be replayed — + /// i.e. not only is this key generated, but it is persisted and committed, such that the key can be used in third-party systems (e.g. payment processing) + /// to introduce idempotence. + generate-idempotency-key: func() -> uuid; + + /// Initiates an update attempt for the given worker. The function returns immediately once the request has been processed, + /// not waiting for the worker to get updated. + update-worker: func(worker-id: worker-id, target-version: component-version, mode: update-mode) -> (); + + /// Get current worker metadata + get-self-metadata: func() -> worker-metadata; + + /// Get worker metadata + get-worker-metadata: func(worker-id: worker-id) -> option; +} + +/// Interface providing user-defined snapshotting capability. This can be used to perform manual update of workers +/// when the new component incompatible with the old one. +interface save-snapshot { + /// Saves the component's state into a user-defined snapshot + save: func() -> list; +} + +/// Interface providing user-defined snapshotting capability. This can be used to perform manual update of workers +/// when the new component incompatible with the old one. +interface load-snapshot { + /// Tries to load a user-defined snapshot, setting up the worker's state based on it. + /// The function can return with a failure to indicate that the update is not possible. + load: func(bytes: list) -> result<_, string>; +} + +world golem-host { + import host; + import save-snapshot; + import load-snapshot; +} diff --git a/wit/deps/golem/golem-oplog-1.1.wit b/wit/deps/golem/golem-oplog-1.1.wit new file mode 100644 index 0000000..8404a3a --- /dev/null +++ b/wit/deps/golem/golem-oplog-1.1.wit @@ -0,0 +1,238 @@ +// UNSTABLE API - WILL BE CHANGING UNTIL THE GOLEM 1.1 RELEASE +// +// BACKWARD COMPATIBILITY GUARANTEES ARE NOT APPLIED TO WORKERS USING THIS HOST INTERFACE + +package golem:api@1.1.0-rc1; + +/// Host interface for enumerating and searching for worker oplogs +interface oplog { + use wasi:clocks/wall-clock@0.2.0.{datetime}; + use golem:api/host@1.1.0-rc1.{account-id, component-version, oplog-index, retry-policy, worker-id}; + use golem:rpc/types@0.1.0.{wit-value}; + + variant wrapped-function-type { + /// The side-effect reads from the worker's local state (for example local file system, + /// random generator, etc.) + read-local, + /// The side-effect writes to the worker's local state (for example local file system) + write-local, + /// The side-effect reads from external state (for example a key-value store) + read-remote, + /// The side-effect manipulates external state (for example an RPC call) + write-remote, + /// The side-effect manipulates external state through multiple invoked functions (for example + /// a HTTP request where reading the response involves multiple host function calls) + /// + /// On the first invocation of the batch, the parameter should be `None` - this triggers + /// writing a `BeginRemoteWrite` entry in the oplog. Followup invocations should contain + /// this entry's index as the parameter. In batched remote writes it is the caller's responsibility + /// to manually write an `EndRemoteWrite` entry (using `end_function`) when the operation is completed. + write-remote-batched(oplog-index) + } + + record create-parameters { + timestamp: datetime, + worker-id: worker-id, + component-version: component-version, + args: list, + env: list>, + account-id: account-id, + parent: option, + component-size: u64, + initial-total-linear-memory-size: u64 + } + + record imported-function-invoked-parameters { + timestamp: datetime, + function-name: string, + response: wit-value, + wrapped-function-type: wrapped-function-type, + } + + record exported-function-invoked-parameters { + timestamp: datetime, + function-name: string, + request: list + } + + record exported-function-completed-parameters { + timestamp: datetime, + response: wit-value, + consumed-fuel: s64 + } + + record error-parameters { + timestamp: datetime, + error: string + } + + record jump-parameters { + timestamp: datetime, + start: oplog-index, + end: oplog-index + } + + record change-retry-policy-parameters { + timestamp: datetime, + retry-policy: retry-policy + } + + record end-atomic-region-parameters { + timestamp: datetime, + begin-index: oplog-index + } + + record end-remote-write-parameters { + timestamp: datetime, + begin-index: oplog-index + } + + record exported-function-invocation-parameters { + idempotency-key: string, + function-name: string, + input: list + } + + variant worker-invocation { + exported-function(exported-function-invocation-parameters), + manual-update(component-version) + } + + record pending-worker-invocation-parameters { + timestamp: datetime, + invocation: worker-invocation + } + + variant update-description { + /// Automatic update by replaying the oplog on the new version + auto-update, + /// Custom update by loading a given snapshot on the new version + snapshot-based(list) + } + + record pending-update-parameters { + timestamp: datetime, + target-version: component-version, + update-description: update-description + } + + record successful-update-parameters { + timestamp: datetime, + target-version: component-version, + new-component-size: u64 + } + + record failed-update-parameters { + timestamp: datetime, + target-version: component-version, + details: option + } + + record grow-memory-parameters { + timestamp: datetime, + delta: u64 + } + + type worker-resource-id = u64; + + record create-resource-parameters { + timestamp: datetime, + resource-id: worker-resource-id + } + + record drop-resource-parameters { + timestamp: datetime, + resource-id: worker-resource-id + } + + record describe-resource-parameters { + timestamp: datetime, + resource-id: worker-resource-id, + resource-name: string, + resource-params: list + } + + enum log-level { + stdout, + stderr, + trace, + debug, + info, + warn, + error, + critical + } + + record log-parameters { + timestamp: datetime, + level: log-level, + context: string, + message: string + } + + variant oplog-entry { + /// The initial worker oplog entry + create(create-parameters), + /// The worker invoked a host function + imported-function-invoked(imported-function-invoked-parameters), + /// The worker has been invoked + exported-function-invoked(exported-function-invoked-parameters), + /// The worker has completed an invocation + exported-function-completed(exported-function-completed-parameters), + /// Worker suspended + suspend(datetime), + /// Worker failed + error(error-parameters), + /// Marker entry added when get-oplog-index is called from the worker, to make the jumping behavior + /// more predictable. + no-op(timestamp), + /// The worker needs to recover up to the given target oplog index and continue running from + /// the source oplog index from there + /// `jump` is an oplog region representing that from the end of that region we want to go back to the start and + /// ignore all recorded operations in between. + jump(jump-parameters), + /// Indicates that the worker has been interrupted at this point. + /// Only used to recompute the worker's (cached) status, has no effect on execution. + interrupted(datetime), + /// Indicates that the worker has been exited using WASI's exit function. + exited(datetime), + /// Overrides the worker's retry policy + change-retry-policy(change-retry-policy-parameters), + /// Begins an atomic region. All oplog entries after `BeginAtomicRegion` are to be ignored during + /// recovery except if there is a corresponding `EndAtomicRegion` entry. + begin-atomic-region(timestamp), + /// Ends an atomic region. All oplog entries between the corresponding `BeginAtomicRegion` and this + /// entry are to be considered during recovery, and the begin/end markers can be removed during oplog + /// compaction. + end-atomic-region(end-atomic-region-parameters), + /// Begins a remote write operation. Only used when idempotence mode is off. In this case each + /// remote write must be surrounded by a `BeginRemoteWrite` and `EndRemoteWrite` log pair and + /// unfinished remote writes cannot be recovered. + begin-remote-write(timestamp), + /// Marks the end of a remote write operation. Only used when idempotence mode is off. + end-remote-write(end-remote-write-parameters), + /// An invocation request arrived while the worker was busy + pending-worker-invocation(pending-worker-invocation-parameters), + /// An update request arrived and will be applied as soon the worker restarts + pending-update(pending-update-parameters), + /// An update was successfully applied + successful-update(successful-update-parameters), + /// An update failed to be applied + failed-update(failed-update-parameters), + /// Increased total linear memory size + grow-memory(grow-memory-parameters), + /// Created a resource instance + create-resource(create-resource-parameters), + /// Dropped a resource instance + drop-resource(drop-resource-parameters), + /// Adds additional information for a created resource instance + describe-resource(describe-resource-parameters), + /// The worker emitted a log message + log(log-parameters), + } + + resource get-oplog { + constructor(worker-id: worker-id, from: oplog-index); + get-next: func() -> option>; + } +} From d6ef356f63538445eb95ddcb85639e56c88102b3 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:02:16 +0200 Subject: [PATCH 02/12] Fix --- wit/deps/{golem => golem-1.1}/golem-host-1.1.wit | 0 wit/deps/{golem => golem-1.1}/golem-oplog-1.1.wit | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename wit/deps/{golem => golem-1.1}/golem-host-1.1.wit (100%) rename wit/deps/{golem => golem-1.1}/golem-oplog-1.1.wit (100%) diff --git a/wit/deps/golem/golem-host-1.1.wit b/wit/deps/golem-1.1/golem-host-1.1.wit similarity index 100% rename from wit/deps/golem/golem-host-1.1.wit rename to wit/deps/golem-1.1/golem-host-1.1.wit diff --git a/wit/deps/golem/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit similarity index 100% rename from wit/deps/golem/golem-oplog-1.1.wit rename to wit/deps/golem-1.1/golem-oplog-1.1.wit From aa6759cff95f50aa231baab29c9f6087e533a373 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:03:22 +0200 Subject: [PATCH 03/12] Fix --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 8404a3a..fb9ed12 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -232,7 +232,7 @@ interface oplog { } resource get-oplog { - constructor(worker-id: worker-id, from: oplog-index); + constructor(worker-id: worker-id, start: oplog-index); get-next: func() -> option>; } } From dca9e36149c8517a89801dd85427b05c946e47a1 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:04:23 +0200 Subject: [PATCH 04/12] Fix --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index fb9ed12..e6d8172 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -1,7 +1,3 @@ -// UNSTABLE API - WILL BE CHANGING UNTIL THE GOLEM 1.1 RELEASE -// -// BACKWARD COMPATIBILITY GUARANTEES ARE NOT APPLIED TO WORKERS USING THIS HOST INTERFACE - package golem:api@1.1.0-rc1; /// Host interface for enumerating and searching for worker oplogs From 0cbff6e49447046346a7995507627624e02a170b Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:05:41 +0200 Subject: [PATCH 05/12] Fix --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index e6d8172..19842d7 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -181,7 +181,7 @@ interface oplog { error(error-parameters), /// Marker entry added when get-oplog-index is called from the worker, to make the jumping behavior /// more predictable. - no-op(timestamp), + no-op(datetime), /// The worker needs to recover up to the given target oplog index and continue running from /// the source oplog index from there /// `jump` is an oplog region representing that from the end of that region we want to go back to the start and @@ -196,7 +196,7 @@ interface oplog { change-retry-policy(change-retry-policy-parameters), /// Begins an atomic region. All oplog entries after `BeginAtomicRegion` are to be ignored during /// recovery except if there is a corresponding `EndAtomicRegion` entry. - begin-atomic-region(timestamp), + begin-atomic-region(datetime), /// Ends an atomic region. All oplog entries between the corresponding `BeginAtomicRegion` and this /// entry are to be considered during recovery, and the begin/end markers can be removed during oplog /// compaction. @@ -204,7 +204,7 @@ interface oplog { /// Begins a remote write operation. Only used when idempotence mode is off. In this case each /// remote write must be surrounded by a `BeginRemoteWrite` and `EndRemoteWrite` log pair and /// unfinished remote writes cannot be recovered. - begin-remote-write(timestamp), + begin-remote-write(datetime), /// Marks the end of a remote write operation. Only used when idempotence mode is off. end-remote-write(end-remote-write-parameters), /// An invocation request arrived while the worker was busy From 08c33001d2280e26429db1422e360f0c9a65a4f6 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 30 Sep 2024 19:09:11 +0200 Subject: [PATCH 06/12] Fix --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 19842d7..113a4b2 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -3,9 +3,10 @@ package golem:api@1.1.0-rc1; /// Host interface for enumerating and searching for worker oplogs interface oplog { use wasi:clocks/wall-clock@0.2.0.{datetime}; - use golem:api/host@1.1.0-rc1.{account-id, component-version, oplog-index, retry-policy, worker-id}; use golem:rpc/types@0.1.0.{wit-value}; + use host.{account-id, component-version, oplog-index, retry-policy, worker-id}; + variant wrapped-function-type { /// The side-effect reads from the worker's local state (for example local file system, /// random generator, etc.) From 1723392951b7856f83d495252f783e68d4d6450e Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 10:46:08 +0200 Subject: [PATCH 07/12] Added request field --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 1 + 1 file changed, 1 insertion(+) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 113a4b2..7a1a1e0 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -42,6 +42,7 @@ interface oplog { record imported-function-invoked-parameters { timestamp: datetime, function-name: string, + request: wit-value, response: wit-value, wrapped-function-type: wrapped-function-type, } From 8acc190cae123df4465d79737d165919c502bd07 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 10:48:53 +0200 Subject: [PATCH 08/12] Fix --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 7a1a1e0..4e90c3d 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -24,7 +24,7 @@ interface oplog { /// writing a `BeginRemoteWrite` entry in the oplog. Followup invocations should contain /// this entry's index as the parameter. In batched remote writes it is the caller's responsibility /// to manually write an `EndRemoteWrite` entry (using `end_function`) when the operation is completed. - write-remote-batched(oplog-index) + write-remote-batched(option) } record create-parameters { From 5af4cc20f9448d3c2ab705abf52e7ca13c9ad34a Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 12:31:03 +0200 Subject: [PATCH 09/12] Missing field --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 4e90c3d..2d845e2 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -50,7 +50,8 @@ interface oplog { record exported-function-invoked-parameters { timestamp: datetime, function-name: string, - request: list + request: list, + idempotency-key: string } record exported-function-completed-parameters { From 080a8cff9d102b900b040be29321d95ebe0140d0 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 13:19:24 +0200 Subject: [PATCH 10/12] restart --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 2d845e2..076b41f 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -228,6 +228,8 @@ interface oplog { describe-resource(describe-resource-parameters), /// The worker emitted a log message log(log-parameters), + /// The worker's has been restarted, forgetting all its history + restart(datetime) } resource get-oplog { From bc4fea3184db76a5975776429dc66bc6ffc6698e Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 17:30:21 +0200 Subject: [PATCH 11/12] exported-function-invocation-parameters input is not always available --- wit/deps/golem-1.1/golem-oplog-1.1.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.1/golem-oplog-1.1.wit index 076b41f..438d4c0 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.1/golem-oplog-1.1.wit @@ -89,7 +89,7 @@ interface oplog { record exported-function-invocation-parameters { idempotency-key: string, function-name: string, - input: list + input: option> } variant worker-invocation { From 2fb8190645b8e98c25d3f8191edce4319da989b2 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 7 Oct 2024 18:27:02 +0200 Subject: [PATCH 12/12] Fix typo --- wit/deps/golem-1.1/golem-host-1.1.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/deps/golem-1.1/golem-host-1.1.wit b/wit/deps/golem-1.1/golem-host-1.1.wit index b439786..a2cb954 100644 --- a/wit/deps/golem-1.1/golem-host-1.1.wit +++ b/wit/deps/golem-1.1/golem-host-1.1.wit @@ -56,7 +56,7 @@ interface host { /// Multiplier applied to the delay on each retry to implement exponential backoff multiplier: f64, /// The maximum amount of jitter to add to the delay - max-jitter-factory: option + max-jitter-factor: option } /// Configurable persistence level for workers