Summary
- Replace EC2 suspension/unsuspension lookup filters that matched
tag:Name = resource_namewithtag:ResourceId = resource_id. - Keep the existing state filters (
runningfor suspension,stoppedfor unsuspension). - Add a regression test covering the ResourceId filter construction and guarding against the old Name-tag lookup.
Test plan
rustfmt --edition 2024 --check src/api/src/suspension.rscargo test -p api suspension::tests::instance_lookup_filters_target_resource_id_tag_not_name_tag -- --nocapturecargo test -p api suspension -- --nocapturecargo test --workspacecargo clippy -p api --all-targets --all-featuresgit diff --check
Notes:
- Full
cargo fmt --checkis currently blocked by pre-existing formatting drift outside this change (src/enclave-builder/src/bin/remote-build-helper.rs,src/enclave-builder/src/build.rs). The touched file passesrustfmt --edition 2024 --check. cargo clippy -p api --all-targets --all-features -- -D warningsis currently blocked by pre-existing warnings in path dependencies / api code; non-deny clippy completes successfully.
Closes #332
## Summary
- Replace EC2 suspension/unsuspension lookup filters that matched `tag:Name = resource_name` with `tag:ResourceId = resource_id`.
- Keep the existing state filters (`running` for suspension, `stopped` for unsuspension).
- Add a regression test covering the ResourceId filter construction and guarding against the old Name-tag lookup.
## Test plan
- `rustfmt --edition 2024 --check src/api/src/suspension.rs`
- `cargo test -p api suspension::tests::instance_lookup_filters_target_resource_id_tag_not_name_tag -- --nocapture`
- `cargo test -p api suspension -- --nocapture`
- `cargo test --workspace`
- `cargo clippy -p api --all-targets --all-features`
- `git diff --check`
Notes:
- Full `cargo fmt --check` is currently blocked by pre-existing formatting drift outside this change (`src/enclave-builder/src/bin/remote-build-helper.rs`, `src/enclave-builder/src/build.rs`). The touched file passes `rustfmt --edition 2024 --check`.
- `cargo clippy -p api --all-targets --all-features -- -D warnings` is currently blocked by pre-existing warnings in path dependencies / api code; non-deny clippy completes successfully.
Closes #332