feat: release Dever 0.1.5 with direct workers and long transactions

This commit is contained in:
Codex committed 2026-10-11 11:17:33 +00:00
1 parent 89629c2197
commit a900d7e8db
153 files changed
+3676 -3708

No files matched your search

+13 -11
View File
@@ -5,8 +5,8 @@ use dever_runtime::component::{self, Definition, Reply};
use dever_runtime::wire::{Encoded, Encoder};
use sha2::{Digest, Sha256};
#[path = "support/sandbox.rs"]
mod sandbox;
#[path = "support/process_runtime.rs"]
mod process_runtime;
#[path = "support/temp.rs"]
mod temp;
@@ -28,8 +28,6 @@ fn component_protocol_and_lifecycle_are_bounded() {
let fixture = install_fixture();
let result = dever_runtime::task::run_entry(async {
fixture.prepare()?;
// One invocation keeps the same deployment grants even if settings are
// replaced between Worker startup, cancellation and restart.
fs::write(
fixture.directory.path().join("config/setting.json"),
"invalid",
@@ -252,6 +250,12 @@ fn definition(
mode: &'static str,
timeout_ms: u64,
) -> Definition {
let (_, setting) = component::adapter_settings()
.unwrap()
.select_adapter("notification.delivery", &["fixture"])
.unwrap();
let mut setting: serde_json::Value = serde_json::from_str(&setting.unwrap()).unwrap();
setting["mode"] = serde_json::json!(mode);
Definition {
ecosystem: "exec".into(),
key: key.into(),
@@ -261,9 +265,7 @@ fn definition(
schema: "a19ca3e615ce5e71".into(),
capabilities: vec!["network".into(), "file".into()],
operations: OPERATIONS.iter().map(|name| (*name).into()).collect(),
setting: Some(format!(
r#"{{"mode":"{mode}","marker":"/data/lifecycle/worker"}}"#
)),
setting: Some(setting.to_string()),
timeout_ms,
}
}
@@ -295,15 +297,15 @@ fn install_fixture() -> InstalledFixture {
let directory = temp::TemporaryDirectory::new();
fs::create_dir(directory.path().join("lifecycle")).unwrap();
fs::create_dir(directory.path().join("config")).unwrap();
fs::write(directory.path().join("config/setting.json"), r#"{"adapter":{"notification.delivery":{"files":{"lifecycle":{"path":"lifecycle","write":true}}}}}"#).unwrap();
fs::write(directory.path().join("config/setting.json"), serde_json::json!({"adapter":{"notification.delivery":{"setting":{"marker":directory.path().join("lifecycle/worker")}}}}).to_string()).unwrap();
let workspace = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
let mut assets = sandbox::assets(&workspace);
assets.push(sandbox::Asset {
let mut assets = process_runtime::assets(&workspace);
assets.push(process_runtime::Asset {
path: "workers/fixture/worker".into(),
bytes: fs::read(env!("CARGO_BIN_EXE_component-fixture")).unwrap(),
executable: true,
});
assets.push(sandbox::Asset {
assets.push(process_runtime::Asset {
path: "worker.dever-worker.json".into(),
bytes: br#"{"format":"dever-worker-launch-v1","ecosystem":"exec","entry":"worker","executable":"workers/fixture/worker","arguments":[],"working_directory":"workers/fixture"}"#.to_vec(), executable: false,
});