Skip to content

Commit

Permalink
Golem 1.1.0 RC1 (#1112)
Browse files Browse the repository at this point in the history
* Update golem-wit

* Updated test components

* Proper golem-rust version

* Update golem-examples

* Updated golem-wasm-ast

* Updated golem-wasm-rpc

* Fix

* Fix go test components
  • Loading branch information
vigoo authored Dec 4, 2024
1 parent e20e069 commit 35555c8
Show file tree
Hide file tree
Showing 118 changed files with 10,299 additions and 186 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ futures = "0.3"
futures-core = "0.3.29"
futures-util = "0.3.29"
git-version = "0.3.9"
golem-wasm-ast = "1.0.1"
golem-wasm-rpc = { version = "=1.0.16", default-features = false, features = [
golem-wasm-ast = "1.1.0-rc1"
golem-wasm-rpc = { version = "1.1.0-rc1", default-features = false, features = [
"host",
] }
hex = "0.4.3"
Expand Down
4 changes: 2 additions & 2 deletions golem-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ derive_more = { workspace = true }
dirs = "5.0.1"
futures-util = { workspace = true }
glob = "0.3.1"
golem-examples = "1.0.7"
golem-examples = "1.1.0-rc1"
golem-wasm-ast = { workspace = true }
golem-wasm-rpc = { workspace = true }
golem-wasm-rpc-stubgen = { version = "=1.0.16", optional = true, default-features = false }
golem-wasm-rpc-stubgen = { version = "1.1.0-rc1", optional = true, default-features = false }
h2 = "0.3.24"
http = { workspace = true }
humansize = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion golem-worker-executor-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fs-set-times = "0.20.1"
futures = { workspace = true }
futures-util = { workspace = true }
gethostname = "0.4.3"
golem-wit = { version = "=1.0.5" }
golem-wit = { version = "=1.1.0-rc1" }
hex = { workspace = true }
http = { workspace = true }
http_02 = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions golem-worker-executor-base/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fn preview2_mod_gen(golem_wit_path: &str) -> String {
path: "{golem_wit_path}/wit",
interfaces: "
import golem:api/[email protected];
import golem:api/[email protected]-rc1;
import golem:api/[email protected]-rc1;
import golem:api/[email protected];
import golem:api/[email protected];
import wasi:blobstore/blobstore;
import wasi:blobstore/container;
Expand Down
50 changes: 25 additions & 25 deletions golem-worker-executor-base/src/durable_host/golem/v11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ use crate::model::public_oplog::{
};
use crate::preview2::golem;
use crate::preview2::golem::api0_2_0::host::GetWorkers;
use crate::preview2::golem::api1_1_0_rc1::host::{
use crate::preview2::golem::api1_1_0::host::{
ComponentId, ComponentVersion, FilterComparator, Host, HostGetWorkers, OplogIndex,
PersistenceLevel, PromiseId, RetryPolicy, StringFilterComparator, UpdateMode, Uuid,
WorkerAllFilter, WorkerAnyFilter, WorkerCreatedAtFilter, WorkerEnvFilter, WorkerId,
WorkerMetadata, WorkerNameFilter, WorkerPropertyFilter, WorkerStatus, WorkerStatusFilter,
WorkerVersionFilter,
};
use crate::preview2::golem::api1_1_0_rc1::oplog::{
use crate::preview2::golem::api1_1_0::oplog::{
Host as OplogHost, HostGetOplog, HostSearchOplog, OplogEntry, SearchOplog,
};
use crate::services::{HasOplogService, HasPlugins};
Expand Down Expand Up @@ -188,8 +188,8 @@ impl<Ctx: WorkerCtx> Host for DurableWorkerCtx<Ctx> {
impl<Ctx: WorkerCtx> HostGetOplog for DurableWorkerCtx<Ctx> {
async fn new(
&mut self,
worker_id: crate::preview2::golem::api1_1_0_rc1::oplog::WorkerId,
start: crate::preview2::golem::api1_1_0_rc1::oplog::OplogIndex,
worker_id: crate::preview2::golem::api1_1_0::oplog::WorkerId,
start: crate::preview2::golem::api1_1_0::oplog::OplogIndex,
) -> anyhow::Result<Resource<GetOplogEntry>> {
let _permit = self.begin_async_host_function().await?;
record_host_function_call("golem::api::get-oplog", "new");
Expand Down Expand Up @@ -293,7 +293,7 @@ impl crate::durable_host::golem::v11::GetOplogEntry {
impl<Ctx: WorkerCtx> HostSearchOplog for DurableWorkerCtx<Ctx> {
async fn new(
&mut self,
worker_id: golem::api1_1_0_rc1::oplog::WorkerId,
worker_id: golem::api1_1_0::oplog::WorkerId,
text: String,
) -> anyhow::Result<Resource<SearchOplog>> {
let _permit = self.begin_async_host_function().await?;
Expand All @@ -316,7 +316,7 @@ impl<Ctx: WorkerCtx> HostSearchOplog for DurableWorkerCtx<Ctx> {
async fn get_next(
&mut self,
self_: Resource<SearchOplog>,
) -> anyhow::Result<Option<Vec<(golem::api1_1_0_rc1::oplog::OplogIndex, OplogEntry)>>> {
) -> anyhow::Result<Option<Vec<(golem::api1_1_0::oplog::OplogIndex, OplogEntry)>>> {
let _permit = self.begin_async_host_function().await?;
record_host_function_call("golem::api::search-oplog", "get-next");

Expand Down Expand Up @@ -349,7 +349,7 @@ impl<Ctx: WorkerCtx> HostSearchOplog for DurableWorkerCtx<Ctx> {
.entries
.into_iter()
.map(|(idx, entry)| {
let idx: golem::api1_1_0_rc1::oplog::OplogIndex = idx.into();
let idx: golem::api1_1_0::oplog::OplogIndex = idx.into();
let entry: OplogEntry = entry.into();
(idx, entry)
})
Expand Down Expand Up @@ -529,8 +529,8 @@ impl<Ctx: WorkerCtx> Host for &mut DurableWorkerCtx<Ctx> {
impl<Ctx: WorkerCtx> HostGetOplog for &mut DurableWorkerCtx<Ctx> {
async fn new(
&mut self,
worker_id: golem::api1_1_0_rc1::oplog::WorkerId,
start: golem::api1_1_0_rc1::oplog::OplogIndex,
worker_id: golem::api1_1_0::oplog::WorkerId,
start: golem::api1_1_0::oplog::OplogIndex,
) -> anyhow::Result<Resource<GetOplogEntry>> {
HostGetOplog::new(*self, worker_id, start).await
}
Expand All @@ -551,7 +551,7 @@ impl<Ctx: WorkerCtx> HostGetOplog for &mut DurableWorkerCtx<Ctx> {
impl<Ctx: WorkerCtx> HostSearchOplog for &mut DurableWorkerCtx<Ctx> {
async fn new(
&mut self,
worker_id: golem::api1_1_0_rc1::oplog::WorkerId,
worker_id: golem::api1_1_0::oplog::WorkerId,
text: String,
) -> anyhow::Result<Resource<SearchOplog>> {
HostSearchOplog::new(*self, worker_id, text).await
Expand All @@ -560,7 +560,7 @@ impl<Ctx: WorkerCtx> HostSearchOplog for &mut DurableWorkerCtx<Ctx> {
async fn get_next(
&mut self,
self_: Resource<SearchOplog>,
) -> anyhow::Result<Option<Vec<(golem::api1_1_0_rc1::oplog::OplogIndex, OplogEntry)>>> {
) -> anyhow::Result<Option<Vec<(golem::api1_1_0::oplog::OplogIndex, OplogEntry)>>> {
HostSearchOplog::get_next(*self, self_).await
}

Expand Down Expand Up @@ -877,65 +877,65 @@ impl From<WorkerAnyFilter> for golem::api0_2_0::host::WorkerAnyFilter {
}
}

impl From<golem_common::model::WorkerId> for golem::api1_1_0_rc1::host::WorkerId {
impl From<golem_common::model::WorkerId> for golem::api1_1_0::host::WorkerId {
fn from(worker_id: golem_common::model::WorkerId) -> Self {
golem::api1_1_0_rc1::host::WorkerId {
golem::api1_1_0::host::WorkerId {
component_id: worker_id.component_id.into(),
worker_name: worker_id.worker_name,
}
}
}

impl From<golem::api1_1_0_rc1::host::WorkerId> for golem_common::model::WorkerId {
fn from(host: golem::api1_1_0_rc1::host::WorkerId) -> Self {
impl From<golem::api1_1_0::host::WorkerId> for golem_common::model::WorkerId {
fn from(host: golem::api1_1_0::host::WorkerId) -> Self {
Self {
component_id: host.component_id.into(),
worker_name: host.worker_name,
}
}
}

impl From<golem::api1_1_0_rc1::host::ComponentId> for golem_common::model::ComponentId {
fn from(host: golem::api1_1_0_rc1::host::ComponentId) -> Self {
impl From<golem::api1_1_0::host::ComponentId> for golem_common::model::ComponentId {
fn from(host: golem::api1_1_0::host::ComponentId) -> Self {
let high_bits = host.uuid.high_bits;
let low_bits = host.uuid.low_bits;

Self(uuid::Uuid::from_u64_pair(high_bits, low_bits))
}
}

impl From<golem_common::model::ComponentId> for golem::api1_1_0_rc1::host::ComponentId {
impl From<golem_common::model::ComponentId> for golem::api1_1_0::host::ComponentId {
fn from(component_id: golem_common::model::ComponentId) -> Self {
let (high_bits, low_bits) = component_id.0.as_u64_pair();

golem::api1_1_0_rc1::host::ComponentId {
uuid: golem::api1_1_0_rc1::host::Uuid {
golem::api1_1_0::host::ComponentId {
uuid: golem::api1_1_0::host::Uuid {
high_bits,
low_bits,
},
}
}
}

impl From<golem_common::model::PromiseId> for golem::api1_1_0_rc1::host::PromiseId {
impl From<golem_common::model::PromiseId> for golem::api1_1_0::host::PromiseId {
fn from(promise_id: golem_common::model::PromiseId) -> Self {
golem::api1_1_0_rc1::host::PromiseId {
golem::api1_1_0::host::PromiseId {
worker_id: promise_id.worker_id.into(),
oplog_idx: promise_id.oplog_idx.into(),
}
}
}

impl From<golem::api1_1_0_rc1::host::PromiseId> for golem_common::model::PromiseId {
fn from(host: golem::api1_1_0_rc1::host::PromiseId) -> Self {
impl From<golem::api1_1_0::host::PromiseId> for golem_common::model::PromiseId {
fn from(host: golem::api1_1_0::host::PromiseId) -> Self {
Self {
worker_id: host.worker_id.into(),
oplog_idx: golem_common::model::oplog::OplogIndex::from_u64(host.oplog_idx),
}
}
}

impl From<&RetryConfig> for crate::preview2::golem::api1_1_0_rc1::host::RetryPolicy {
impl From<&RetryConfig> for crate::preview2::golem::api1_1_0::host::RetryPolicy {
fn from(value: &RetryConfig) -> Self {
Self {
max_attempts: value.max_attempts,
Expand Down
2 changes: 1 addition & 1 deletion golem-worker-executor-base/src/model/public_oplog/wit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use crate::model::public_oplog::{PublicOplogEntry, PublicUpdateDescription};
use crate::preview2::golem::api1_1_0_rc1::oplog;
use crate::preview2::golem::api1_1_0::oplog;
use crate::preview2::wasi::clocks::wall_clock::Datetime;
use golem_common::model::public_oplog::{
ActivatePluginParameters, ChangeRetryPolicyParameters, CreateParameters,
Expand Down
2 changes: 1 addition & 1 deletion golem-worker-executor-base/src/services/oplog/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl<Ctx: WorkerCtx> OplogProcessorPlugin for PerExecutorOplogProcessorPlugin<Ct
}
}
wave_config.push(']');
let function_name = format!("golem:api/[email protected]-rc1.{{processor({wave_account_info}, {wave_component_id}, {wave_config}).process}}");
let function_name = format!("golem:api/[email protected].{{processor({wave_account_info}, {wave_component_id}, {wave_config}).process}}");

let val_worker_id = worker_metadata.worker_id.clone().into_value();
let val_metadata = worker_metadata.into_value();
Expand Down
4 changes: 2 additions & 2 deletions golem-worker-executor-base/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ use golem_test_framework::components::worker_executor_cluster::WorkerExecutorClu
use golem_test_framework::config::TestDependencies;
use golem_test_framework::dsl::to_worker_metadata;
use golem_worker_executor_base::preview2::golem;
use golem_worker_executor_base::preview2::golem::api1_1_0_rc1;
use golem_worker_executor_base::preview2::golem::api1_1_0;
use golem_worker_executor_base::services::events::Events;
use golem_worker_executor_base::services::oplog::plugin::OplogProcessorPlugin;
use golem_worker_executor_base::services::plugins::{Plugins, PluginsObservations};
Expand Down Expand Up @@ -875,7 +875,7 @@ impl Bootstrap<TestWorkerCtx> for ServerBootstrap {
fn create_wasmtime_linker(&self, engine: &Engine) -> anyhow::Result<Linker<TestWorkerCtx>> {
let mut linker = create_linker(engine, get_durable_ctx)?;
api0_2_0::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
api1_1_0_rc1::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
api1_1_0::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
golem_wasm_rpc::golem::rpc::types::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
Ok(linker)
}
Expand Down
4 changes: 2 additions & 2 deletions golem-worker-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use async_trait::async_trait;
use golem_common::model::component::ComponentOwner;
use golem_common::model::plugin::{DefaultPluginOwner, DefaultPluginScope};
use golem_worker_executor_base::durable_host::DurableWorkerCtx;
use golem_worker_executor_base::preview2::golem::{api0_2_0, api1_1_0_rc1};
use golem_worker_executor_base::preview2::golem::{api0_2_0, api1_1_0};
use golem_worker_executor_base::services::active_workers::ActiveWorkers;
use golem_worker_executor_base::services::blob_store::BlobStoreService;
use golem_worker_executor_base::services::component::ComponentService;
Expand Down Expand Up @@ -170,7 +170,7 @@ impl Bootstrap<Context> for ServerBootstrap {
fn create_wasmtime_linker(&self, engine: &Engine) -> anyhow::Result<Linker<Context>> {
let mut linker = create_linker(engine, get_durable_ctx)?;
api0_2_0::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
api1_1_0_rc1::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
api1_1_0::host::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
golem_wasm_rpc::golem::rpc::types::add_to_linker_get_host(&mut linker, get_durable_ctx)?;
Ok(linker)
}
Expand Down
6 changes: 5 additions & 1 deletion test-components/blob-store-service/wit/deps.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
url = "https://github.com/golemcloud/golem-wit/archive/main.tar.gz"
sha256 = "6ac4f1553003474229bb40a885b48d1eaa4bea2f9d679a115da9afede30b5ad4"
sha512 = "ced8c18a35dc04123386465d98d2aeba54c486e4e22a30e7efac0548974e176528fcba36c64942d67fa35d9135806ff0fcde259eb4af051c4a29fcb397e9af1c"
deps = ["blobstore", "cli", "clocks", "filesystem", "golem", "http", "io", "keyvalue", "logging", "random", "sockets", "wasm-rpc"]
deps = ["blobstore", "cli", "clocks", "filesystem", "golem", "golem-1.1", "http", "io", "keyvalue", "logging", "random", "sockets", "wasm-rpc"]

[blobstore]
sha256 = "eb50ec776eac937b2ef90b41a281d0dd7c94f0b076466d917bd0f2ed5b01d39d"
Expand All @@ -24,6 +24,10 @@ sha512 = "ead452f9b7bfb88593a502ec00d76d4228003d51c40fd0408aebc32d35c94673551b00
sha256 = "181dfcbb2421c6f52303d49aac4b06d8db67eb683e7460acacf29961153247f4"
sha512 = "64c51048f90c4bc83b43c99af570376bcaa4b623c66b97fd418be9fef77d17530e37d7c7f59f2e706b7b5dcfb6728eb11e27e3805a96391c59a264818f513d32"

["golem-1.1"]
sha256 = "1a7f84ace9f5b5d91cb324bc9191e31ef37b24db906212ed995b298d9250644a"
sha512 = "84fb3db673e40615c4f80bca974b95f57cde20ffd534ba749dfbf3e4ff836fe6cf2790cd00904e9e01ca333d54b9f33ad1cc6c778bd4f0c4397aa4da07271976"

[http]
sha256 = "8f44402bde16c48e28c47dc53eab0b26af5b3b3482a1852cf77673e0880ba1c1"
sha512 = "760695f9a25c25bf75a25b731cb21c3bda9e288e450edda823324ecbc73d5d798bbb5de2edad999566980836f037463ee9e57d61789d04b3f3e381475b1a9a0f"
Expand Down
Loading

0 comments on commit 35555c8

Please sign in to comment.