Skip to content
Open
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
21 changes: 19 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ 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)
if: matrix.suite == 'workspace'
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
Comment on lines +206 to +207

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 The new celld startup suites aren't protected against "0 passed"

The AWS step above (line 196) wraps its suite in scripts/run_test_nonzero.sh; these two lines don't. The mixed test production_runner_composes_celld_config_aws_secret_and_local_secret (native_aws_startup.rs:498) is behind #[cfg(feature = "celld-config")] and runs only from line 207. A typo in that cfg or in a feature name would compile it out, and the step would stay green. The plan lists this wrapper as an open item.

Fix:

scripts/run_test_nonzero.sh public_runner_gates_preparation_and_initializer_then_keeps_snapshot_and_live_kv cargo test --offline --locked -p edgezero-adapter-axum --features celld-config,celld-kv,test-utils --test native_celld_startup
scripts/run_test_nonzero.sh production_runner_composes_celld_config_aws_secret_and_local_secret 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 The same gap on the five --lib steps just above (lines 201-205)

The celld lib runs (no features, config, kv, all features) and the axum native-bindings --lib run aren't wrapped in run_test_nonzero.sh either. The celld test modules are behind feature conditions (client.rs:331 #[cfg(any(feature = "config", feature = "kv"))], config.rs:52, kv.rs:334). An accidental change to one of those conditions would quietly reduce the config-only or kv-only run to the 4 settings tests, and the step would still exit 0.

Fix: wrap each line with run_test_nonzero.sh and a test name that must run for that feature mode.


- name: Bundled demo logging and fallback TCP contracts
if: matrix.suite == 'cli'
run: |
Expand Down Expand Up @@ -248,9 +259,15 @@ 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
- name: Generated native celld startup and KV (deterministic loopback fixture)
if: matrix.suite == 'cli'
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
if: matrix.suite == 'cli'
run: node --test scripts/native_aws_test_admin.test.mjs scripts/run_native_aws_integration.test.mjs
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
if: matrix.suite == 'cli'
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.

2 changes: 2 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", "crates/edgezero-test-harness"]
resolver = "2"
Expand Down Expand Up @@ -65,6 +66,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
16 changes: 15 additions & 1 deletion crates/edgezero-adapter-axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,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 @@ -78,6 +80,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 @@ -99,6 +102,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 @@ -1363,12 +1363,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 @@ -1429,9 +1427,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 @@ -1457,9 +1453,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