Skip to content

Commit cb6627b

Browse files
authored
Merge pull request #81 from golemcloud/wasmtime-17
GOL-183 Upgrade to wasmtime 17.0 and the final WASI preview2
2 parents 3139542 + 49bfcf1 commit cb6627b

File tree

420 files changed

+2445
-3818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

420 files changed

+2445
-3818
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ fred = { version = "8.0.0", features = ["metrics", "serde-json", "partial-tracin
5757
futures = "0.3"
5858
futures-core = "0.3.29"
5959
futures-util = "0.3.29"
60-
http = "0.2.11" # keep in sync with wasmtime
60+
golem-wasm-ast = "0.1.4"
61+
http = "1.0.0" # keep in sync with wasmtime
6162
humantime-serde = "1.1.1"
62-
hyper = { version = "=1.0.0-rc.3", features = ["full"] }
63+
hyper = { version = "1.0.1", features = ["full"] } # keep in sync with wasmtime
6364
iso8601-timestamp = "0.2.16"
6465
lazy_static = "1.4.0"
65-
poem = "1.3.59"
66-
poem-openapi = { version = "3.0.6", features = ["swagger-ui", "chrono", "time", "humantime", "uuid", "url", "websocket"] }
66+
poem = "2.0.0"
67+
poem-openapi = { version = "4.0.0", features = ["swagger-ui", "chrono", "time", "humantime", "uuid", "url", "websocket"] }
6768
prometheus = { version = "0.13.3", features = ["process"] }
6869
prost = "0.12.3"
6970
rustls = { version = "0.22.2" }

golem-service-base/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ aws-config = { workspace = true }
1414
aws-sdk-s3 = { workspace = true }
1515
bigdecimal = "0.4.2"
1616
http = { workspace = true }
17+
http_02 = { package="http", version = "0.2.11" }
1718
hyper = { workspace = true }
1819
num-traits = "0.2"
1920
poem-openapi = { workspace = true }

golem-service-base/src/routing_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl RoutingTableServiceDefault {
5858
#[async_trait]
5959
impl RoutingTableService for RoutingTableServiceDefault {
6060
async fn get_routing_table(&self) -> Result<RoutingTable, RoutingTableError> {
61-
let uri: hyper::Uri = self.routing_table_config.url().to_string().parse().unwrap();
61+
let uri: http_02::Uri = self.routing_table_config.url().to_string().parse().unwrap();
6262
self.cache
6363
.get_or_insert_simple(&(), || {
6464
Box::pin(async move {

golem-service-base/src/worker_executor_clients.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ pub struct WorkerExecutorClientsDefault {}
1616
#[async_trait]
1717
impl WorkerExecutorClients for WorkerExecutorClientsDefault {
1818
async fn lookup(&self, pod: &Pod) -> Result<WorkerExecutorClient<Channel>, String> {
19-
let client = WorkerExecutorClient::connect(pod.uri())
19+
let uri: http_02::Uri = pod.uri().to_string().parse().unwrap();
20+
let client = WorkerExecutorClient::connect(uri)
2021
.await
2122
.map_err(|e| e.to_string())?;
2223
Ok(client)

golem-service/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ golem-common = { path = "../golem-common", version = "0.0.0" }
1818
golem-api-grpc = { path = "../golem-api-grpc", version = "0.0.0" }
1919
golem-service-base = { path = "../golem-service-base" }
2020

21+
async-trait = { workspace = true }
22+
console-subscriber = { workspace = true }
23+
golem-wasm-ast = { workspace = true }
24+
mappable-rc = "0.1.1"
25+
figment = { workspace = true }
26+
futures-util = { workspace = true }
2127
poem = { workspace = true }
2228
poem-openapi = { workspace = true }
29+
serde = { workspace = true }
30+
serde_json = { workspace = true }
31+
sqlx = { version = "0.7", features = ["runtime-tokio", "sqlite", "postgres", "uuid" , "migrate", "chrono"] }
32+
tap = "1.0.1"
2333
tonic = { workspace = true }
2434
tonic-health = { workspace = true }
2535
tonic-reflection = { workspace = true }
2636
tokio = { workspace = true }
2737
tokio-stream = { workspace = true }
2838
tokio-util = "0.7.10"
29-
futures-util = { workspace = true }
30-
sqlx = { version = "0.7", features = ["runtime-tokio", "sqlite", "postgres", "uuid" , "migrate", "chrono"] }
31-
async-trait = { workspace = true }
32-
uuid = { workspace = true }
33-
serde = { workspace = true }
34-
serde_json = { workspace = true }
3539
tracing = { workspace = true }
3640
tracing-subscriber = { workspace = true }
37-
console-subscriber = { workspace = true }
38-
figment = { workspace = true }
39-
tap = "1.0.1"
40-
golem-wasm-ast = "0.1.2"
41-
mappable-rc = "0.1.1"
41+
uuid = { workspace = true }
4242

4343

golem-service/src/service/template.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ impl TemplateService for TemplateServiceDefault {
147147
versioned_template_id: versioned_template_id.clone(),
148148
};
149149

150-
info!("Pushing {:?}", user_template_id);
150+
info!(
151+
"Uploaded template {} version 0 with exports {:?}",
152+
versioned_template_id.template_id, metadata.exports
153+
);
151154

152155
let template_size: i32 = data.len().try_into().map_err(|e| {
153156
TemplateError::internal(format!("Failed to convert data length: {}", e))
@@ -158,8 +161,6 @@ impl TemplateService for TemplateServiceDefault {
158161
self.upload_protected_template(&protected_template_id, data)
159162
)?;
160163

161-
info!("TemplateService create_template object store finished");
162-
163164
let template = Template {
164165
template_name: template_name.clone(),
165166
template_size,
@@ -171,8 +172,6 @@ impl TemplateService for TemplateServiceDefault {
171172

172173
self.template_repo.upsert(&template.clone().into()).await?;
173174

174-
info!("TemplateService create_template finished successfully");
175-
176175
Ok(template)
177176
}
178177

@@ -181,7 +180,7 @@ impl TemplateService for TemplateServiceDefault {
181180
template_id: &TemplateId,
182181
data: Vec<u8>,
183182
) -> Result<Template, TemplateError> {
184-
info!("Updating template {}", template_id.0);
183+
info!("Updating template {}", template_id);
185184

186185
let metadata = self.process_template(&data)?;
187186

@@ -193,7 +192,10 @@ impl TemplateService for TemplateServiceDefault {
193192
.map(Template::next_version)
194193
.ok_or(TemplateError::UnknownTemplateId(template_id.clone()))?;
195194

196-
info!("Pushing {:?}", next_template.user_template_id);
195+
info!(
196+
"Uploaded template {} version {} with exports {:?}",
197+
template_id, next_template.versioned_template_id.version, metadata.exports
198+
);
197199

198200
let template_size: i32 = data.len().try_into().map_err(|e| {
199201
TemplateError::internal(format!("Failed to convert data length: {}", e))
@@ -204,8 +206,6 @@ impl TemplateService for TemplateServiceDefault {
204206
self.upload_protected_template(&next_template.protected_template_id, data)
205207
)?;
206208

207-
info!("TemplateService update_template object store finished");
208-
209209
let template = Template {
210210
template_size,
211211
metadata,

golem-shard-manager/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ figment = { workspace = true }
2020
fred = { workspace = true }
2121
futures = { workspace = true }
2222
http = { workspace = true }
23+
http_02 = { package = "http", version = "0.2.11" }
2324
humantime-serde = { workspace = true }
2425
prometheus = { workspace = true }
2526
prost = { workspace = true }

golem-shard-manager/src/http_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::net::SocketAddr;
22

3-
use http::{Response, StatusCode};
3+
use http_02::{Response, StatusCode};
44
use prometheus::{Encoder, Registry, TextEncoder};
55
use tokio::task::JoinHandle;
66
use warp::hyper::Body;

0 commit comments

Comments
 (0)