Skip to content

Commit 08b0ad5

Browse files
Merge pull request #331 from kate-goldenring/spin-v3.3.1
Update to use Spin v3.3.1 dependencies
2 parents f8bc870 + 96e915d commit 08b0ad5

File tree

8 files changed

+1701
-1499
lines changed

8 files changed

+1701
-1499
lines changed

Cargo.lock

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

containerd-shim-spin/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ Containerd shim for running Spin workloads.
1313
[dependencies]
1414
containerd-shim-wasm = { version = "1.0.0", default-features = false, features = ["opentelemetry"]}
1515
log = "0.4"
16-
spin-app = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
17-
spin-componentize = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
16+
spin-app = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
17+
spin-componentize = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
1818
# Enable loading components precompiled by the shim
19-
spin-trigger = { git = "https://github.com/spinframework/spin", tag = "v3.2.0", features = [
19+
spin-trigger = { git = "https://github.com/spinframework/spin", tag = "v3.3.1", features = [
2020
"unsafe-aot-compilation",
2121
] }
22-
spin-trigger-http = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
23-
spin-trigger-redis = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
24-
trigger-mqtt = { git = "https://github.com/spinframework/spin-trigger-mqtt", tag = "v0.4.0" }
25-
trigger-sqs = { git = "https://github.com/spinframework/spin-trigger-sqs", tag = "v0.9.0" }
26-
trigger-command = { git = "https://github.com/spinframework/spin-trigger-command", tag = "v0.3.0" }
27-
spin-loader = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
28-
spin-oci = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
29-
spin-telemetry = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
30-
spin-runtime-factors = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
31-
spin-factor-outbound-networking = { git = "https://github.com/spinframework/spin", tag = "v3.2.0" }
32-
wasmtime = "29.0.1"
22+
spin-trigger-http = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
23+
spin-trigger-redis = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
24+
trigger-mqtt = { git = "https://github.com/spinframework/spin-trigger-mqtt", tag = "v0.4.2" }
25+
trigger-sqs = { git = "https://github.com/spinframework/spin-trigger-sqs", tag = "v0.9.2" }
26+
trigger-command = { git = "https://github.com/spinframework/spin-trigger-command", tag = "v0.3.2" }
27+
spin-loader = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
28+
spin-oci = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
29+
spin-telemetry = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
30+
spin-runtime-factors = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
31+
spin-factor-outbound-networking = { git = "https://github.com/spinframework/spin", tag = "v3.3.1" }
32+
wasmtime = "33.0.0"
3333
openssl = { version = "*", features = ["vendored"] }
3434
anyhow = "1.0"
3535
oci-spec = "0.7"

containerd-shim-spin/src/engine.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl SpinSandbox {
138138
configure_application_variables_from_environment_variables(&locked_app)?;
139139
let trigger_cmds = get_supported_triggers(&locked_app)
140140
.with_context(|| format!("Couldn't find trigger executor for {app_source:?}"))?;
141-
let _telemetry_guard = spin_telemetry::init(version!().version.to_string())?;
141+
spin_telemetry::init(version!().version.to_string())?;
142142

143143
self.run_trigger(ctx, &trigger_cmds, locked_app, app_source)
144144
.await
@@ -167,9 +167,11 @@ impl SpinSandbox {
167167
let mut futures_list = Vec::new();
168168
let mut trigger_type_map = Vec::new();
169169
// The `HOSTNAME` environment variable should contain the fully unique container name
170-
let app_id = std::env::var("HOSTNAME").unwrap_or_else(|_| "unknown".into());
170+
let app_id = std::sync::Arc::<str>::from(
171+
std::env::var("HOSTNAME").unwrap_or_else(|_| "unknown".into()),
172+
);
171173
for trigger_type in trigger_types.iter() {
172-
let app = spin_app::App::new(&app_id, app.clone());
174+
let app = spin_app::App::new(app_id.clone(), app.clone());
173175
let f = match trigger_type.as_str() {
174176
HTTP_TRIGGER_TYPE => {
175177
let address_str = env::var(constants::SPIN_HTTP_LISTEN_ADDR_ENV)
@@ -233,7 +235,7 @@ impl Compiler for SpinCompiler {
233235
"Precompile called for wasm layer {:?}",
234236
wasm_layer.config.digest()
235237
);
236-
if self.0.detect_precompiled(&wasm_layer.layer).is_some() {
238+
if wasmtime::Engine::detect_precompiled(&wasm_layer.layer).is_some() {
237239
log::info!("Layer already precompiled {:?}", wasm_layer.config.digest());
238240
Ok(Some(wasm_layer.layer))
239241
} else {

images/spin/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ RUN rustup target add wasm32-wasip1
44
COPY . .
55
RUN cargo build --target wasm32-wasip1 --release
66

7-
FROM --platform=linux/amd64 golang:1.23.2-bullseye AS build-go
7+
FROM --platform=linux/amd64 golang:1.24.3-bullseye AS build-go
88
WORKDIR /opt/build
9-
RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb && dpkg -i tinygo_0.34.0_amd64.deb
9+
RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.38.0/tinygo_0.38.0_amd64.deb && dpkg -i tinygo_0.38.0_amd64.deb
1010
COPY . .
1111
WORKDIR /opt/build/go-hello
1212
RUN if [ -f go.mod ]; then go mod download; fi

images/spin/go-hello/go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
2-
31
module github.com/spinkube/containerd-shim-spin/go-hello
42

5-
go 1.20
3+
go 1.24
64

7-
require github.com/fermyon/spin/sdk/go/v2 v2.0.0
5+
require github.com/fermyon/spin/sdk/go/v2 v2.2.0
86

9-
require github.com/julienschmidt/httprouter v1.3.0 // indirect
7+
require github.com/julienschmidt/httprouter v1.3.0 // indirect

images/spin/go-hello/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github.com/fermyon/spin/sdk/go/v2 v2.0.0 h1:pMq2BxXio9gsBdPVNCuebCsLSt64yaTS3kV2l1gL088=
2-
github.com/fermyon/spin/sdk/go/v2 v2.0.0/go.mod h1:kfJ+gdf/xIaKrsC6JHCUDYMv2Bzib1ohFIYUzvP+SCw=
1+
github.com/fermyon/spin/sdk/go/v2 v2.2.0 h1:zHZdIqjbUwyxiwdygHItnM+vUUNSZ3CX43jbIUemBI4=
2+
github.com/fermyon/spin/sdk/go/v2 v2.2.0/go.mod h1:kfJ+gdf/xIaKrsC6JHCUDYMv2Bzib1ohFIYUzvP+SCw=
33
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
44
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
252 KB
Binary file not shown.

scripts/setup-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ sudo apt-get install -y protobuf-compiler libseccomp-dev
44

55
## setup tinygo. required for building test spin app
66
echo "setting up tinygo"
7-
wget https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb
8-
sudo dpkg -i tinygo_0.34.0_amd64.deb
9-
rm tinygo_0.34.0_amd64.deb
7+
wget https://github.com/tinygo-org/tinygo/releases/download/v0.38.0/tinygo_0.38.0_amd64.deb
8+
sudo dpkg -i tinygo_0.38.0_amd64.deb
9+
rm tinygo_0.38.0_amd64.deb

0 commit comments

Comments
 (0)