From 024b183863c189f3d89bd8afd2e534ac71dcedd0 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Fri, 26 Jul 2024 12:50:14 +0200 Subject: [PATCH 1/2] Clean up golem-host.wit --- wit/deps/golem/golem-host.wit | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wit/deps/golem/golem-host.wit b/wit/deps/golem/golem-host.wit index 874d22e..10787a7 100644 --- a/wit/deps/golem/golem-host.wit +++ b/wit/deps/golem/golem-host.wit @@ -46,7 +46,7 @@ interface host { /// The maximum delay between retries max-delay: duration, /// Multiplier applied to the delay on each retry to implement exponential backoff - multiplier: u32 + multiplier: f64 } /// Configurable persistence level for workers @@ -58,7 +58,7 @@ interface host { /// 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 + /// Automatic update tries to recover the worker using the new component version /// and may fail if there is a divergence. automatic, @@ -159,18 +159,18 @@ interface host { } /// Create a new promise - golem-create-promise: func() -> promise-id; + create-promise: func() -> promise-id; /// Suspends execution until the given promise gets completed, and returns the payload passed to /// the promise completion. - golem-await-promise: func(promise-id: promise-id) -> list; + 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. - golem-complete-promise: func(promise-id: promise-id, data: list) -> bool; + complete-promise: func(promise-id: promise-id, data: list) -> bool; /// Deletes the given promise - golem-delete-promise: func(promise-id: promise-id) -> (); + delete-promise: func(promise-id: promise-id) -> (); /// Returns a Golem worker URI that can be used to invoke a given function on the current worker get-self-uri: func(function-name: string) -> uri; @@ -182,13 +182,13 @@ interface host { /// 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, + /// 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. + /// 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; @@ -203,7 +203,7 @@ interface host { /// new retry policy. set-retry-policy: func(new-retry-policy: retry-policy) -> (); - /// Gets the worker's current persistence level. + /// 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 @@ -215,11 +215,11 @@ interface host { /// 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 + /// 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 — + /// 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; @@ -254,4 +254,4 @@ world golem-host { import host; import save-snapshot; import load-snapshot; -} \ No newline at end of file +} From d198147e4da795f776d738ac66414367d2eead1d Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Fri, 26 Jul 2024 12:53:34 +0200 Subject: [PATCH 2/2] Update wasm-tools to the latest recommended version --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d9859c8..8061a96 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,8 +42,8 @@ jobs: run: cargo test - uses: cargo-bins/cargo-binstall@main - name: Validate WIT - run: | - cargo binstall --no-confirm wasm-tools@1.0.57 + run: | + cargo binstall --no-confirm wasm-tools@1.210.0 wasm-tools component wit -vv wit publish: needs: [build]