Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ jobs:
cargo test --offline --locked -p edgezero-store-aws --all-features --lib
scripts/run_test_nonzero.sh production_runner_loads_envelope_and_real_sdk_secret_before_serving_mixed_stores cargo test --offline --locked -p edgezero-adapter-axum --features aws-stores,test-utils --test native_aws_startup

- name: Native celld independent provider and startup contracts (loopback only)
run: |
cargo test --offline --locked -p edgezero-store-celld --no-default-features --lib
cargo test --offline --locked -p edgezero-store-celld --no-default-features --features config --lib
cargo test --offline --locked -p edgezero-store-celld --no-default-features --features kv --lib
cargo test --offline --locked -p edgezero-store-celld --all-features --lib
cargo test --offline --locked -p edgezero-adapter-axum --no-default-features --features native-bindings --lib
cargo test --offline --locked -p edgezero-adapter-axum --features celld-config,celld-kv,test-utils --test native_celld_startup
cargo test --offline --locked -p edgezero-adapter-axum --features aws-stores,aws-dynamodb,celld-config,celld-kv,test-utils --lib --test native_aws_startup --test native_celld_startup

- name: Bundled demo logging contract
run: scripts/run_test_nonzero.sh demo_respects_off_without_hiding_terminal_errors cargo test --offline --locked -p edgezero-cli --features demo-example --test demo_logging

Expand Down Expand Up @@ -169,8 +179,13 @@ jobs:
EDGEZERO_GENERATED_TEST_TARGET_DIR: ${{ github.workspace }}/target
run: scripts/run_test_nonzero.sh --ignored generated_cli_default_off_and_enabled_dynamodb_crud_list_ttl_restart cargo test --offline --locked -p edgezero-cli --test dynamodb_generated_proof

- name: Native AWS integration runner tests
run: node --test scripts/native_aws_test_admin.test.mjs scripts/run_native_aws_integration.test.mjs
- name: Generated native celld startup and KV (deterministic loopback fixture)
env:
EDGEZERO_GENERATED_TEST_TARGET_DIR: ${{ github.workspace }}/target
run: scripts/run_test_nonzero.sh --ignored generated_celld_default_off_kv_and_config_restart cargo test --offline --locked -p edgezero-cli --no-default-features --features cli,edgezero-adapter-axum --test celld_generated_proof generated_celld_default_off_kv_and_config_restart

- name: Native provider integration runner tests
run: node --test scripts/native_aws_test_admin.test.mjs scripts/run_native_aws_integration.test.mjs scripts/run_native_celld_integration.test.mjs

- name: Generated native AWS independent service contracts
env:
Expand Down
22 changes: 22 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"crates/edgezero-core",
"crates/edgezero-macros",
"crates/edgezero-store-aws",
"crates/edgezero-store-celld",
]
exclude = ["examples/app-demo"]
resolver = "2"
Expand Down Expand Up @@ -60,6 +61,7 @@ edgezero-adapter-fastly = { path = "crates/edgezero-adapter-fastly", default-fea
edgezero-adapter-spin = { path = "crates/edgezero-adapter-spin", default-features = false }
edgezero-core = { path = "crates/edgezero-core", default-features = false }
edgezero-store-aws = { path = "crates/edgezero-store-aws", default-features = false }
edgezero-store-celld = { path = "crates/edgezero-store-celld", default-features = false }
edgezero-cli = { path = "crates/edgezero-cli", default-features = false }
fastly = "=0.13.1"
fastly-shared = "=0.13.1"
Expand Down Expand Up @@ -109,6 +111,7 @@ tempfile = "3"
toml_edit = "0.25"
thiserror = "2"
tokio = { version = "1", features = ["io-util", "macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
tokio-rustls = { version = "=0.26.4", default-features = false, features = ["aws_lc_rs", "tls12"] }
trybuild = "1"
toml = { version = "1.1" }
tower = { version = "0.5", features = ["util"] }
Expand Down
16 changes: 15 additions & 1 deletion crates/edgezero-adapter-axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ axum = [
"dep:reqwest",
"dep:redb",
]
native-bindings = ["dep:toml", "dep:edgezero-store-aws"]
native-bindings = ["dep:toml", "dep:edgezero-store-aws", "dep:edgezero-store-celld"]
aws-appconfig-agent = ["axum", "edgezero-store-aws/appconfig-agent"]
aws-secrets-manager = ["axum", "edgezero-store-aws/secrets-manager"]
aws-stores = ["aws-appconfig-agent", "aws-secrets-manager"]
aws-dynamodb = ["axum", "edgezero-store-aws/dynamodb-kv"]
celld-config = ["axum", "edgezero-store-celld/config"]
celld-kv = ["axum", "edgezero-store-celld/kv"]
cli = [
"native-bindings",
"dep:edgezero-adapter",
Expand Down Expand Up @@ -72,6 +74,7 @@ walkdir = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
edgezero-store-aws = { workspace = true, optional = true }
edgezero-store-celld = { workspace = true, optional = true }

[target.'cfg(unix)'.dependencies]
libc = { workspace = true }
Expand All @@ -93,6 +96,17 @@ name = "native_aws_startup"
path = "tests/native_aws_startup.rs"
required-features = ["aws-stores", "test-utils"]

[[bin]]
name = "edgezero-native-celld-host"
path = "tests/fixtures/native_celld_host.rs"
required-features = ["celld-config", "celld-kv", "test-utils"]
test = false

[[test]]
name = "native_celld_startup"
path = "tests/native_celld_startup.rs"
required-features = ["celld-config", "celld-kv", "test-utils"]

[dev-dependencies]
async-trait = { workspace = true }
axum = { workspace = true, features = ["macros"] }
Expand Down
14 changes: 4 additions & 10 deletions crates/edgezero-adapter-axum/src/dev_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,12 +987,10 @@ async fn build_production_stores(
let mut kv = BTreeMap::new();
let mut secrets = BTreeMap::new();
let mut resident = 0_usize;
let mut aws = sources.session()?;
let mut sessions = sources.sessions()?;
for (id, source) in sources.config {
let binding = match source {
NativeStoreSource::BuiltIn(builtin) => {
native_stores::prepare_aws_config(builtin, &mut aws, id).await?
}
NativeStoreSource::BuiltIn(builtin) => sessions.prepare_config(builtin, id).await?,
local @ (NativeStoreSource::Local
| NativeStoreSource::Ready(_)
| NativeStoreSource::Prepare(_)) => {
Expand Down Expand Up @@ -1053,9 +1051,7 @@ async fn build_production_stores(
}
for (id, source) in sources.kv {
let handle = match source {
NativeStoreSource::BuiltIn(builtin) => {
native_stores::prepare_aws_kv(builtin, &mut aws, id).await?
}
NativeStoreSource::BuiltIn(builtin) => sessions.prepare_kv(builtin, id).await?,
local @ (NativeStoreSource::Local
| NativeStoreSource::Ready(_)
| NativeStoreSource::Prepare(_)) => {
Expand All @@ -1081,9 +1077,7 @@ async fn build_production_stores(
let environment_secrets = SecretHandle::new(Arc::new(EnvSecretStore::new()));
for (id, source) in sources.secrets {
let binding = match source {
NativeStoreSource::BuiltIn(builtin) => {
native_stores::prepare_aws_secrets(builtin, &mut aws, id).await?
}
NativeStoreSource::BuiltIn(builtin) => sessions.prepare_secrets(builtin, id).await?,
local @ (NativeStoreSource::Local
| NativeStoreSource::Ready(_)
| NativeStoreSource::Prepare(_)) => {
Expand Down
Loading
Loading