Feat/localstack staging smoke gate#5124
Conversation
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
|
Warning Review limit reached
Next review available in: 18 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds LocalStack-backed infrastructure smoke testing: new CI/CD workflow wiring for LOCALSTACK_AUTH_TOKEN, a reusable smoke-test workflow, an updated Makefile with a new test-infrastructure-smoke target, a run-smoke-tests.sh script managing LocalStack lifecycle, per-module Terraform smoke test files, and documentation/dictionary updates. ChangesLocalStack Smoke Testing Infrastructure
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
5 issues found across 12 files
Confidence score: 2/5
.github/workflows/run-infrastructure-smoke.yamlpoints to./.github/actions/setup-terraform-environment, but that composite action is missing, so the smoke workflow is likely to fail at startup and block reliable CI signal — add/restore the action (or updateuses:to a valid path) before merging.infrastructure/scripts/run-smoke-tests.shuses a LocalStack readiness match that can report healthy while required services are still unavailable, which can make smoke results flaky and mask real regressions — tighten the pattern to the same key/value pair per service before merging.infrastructure/scripts/run-smoke-tests.shdoes not fail fast whenLOCALSTACK_AUTH_TOKENis unset, so runs can proceed and fail later with less actionable errors (notably for paid-plan services like ECR) — add an early token presence check and clear exit message.- Test coverage in
infrastructure/modules/parameters/tests/smoke.tftest.hclandinfrastructure/modules/storage/tests/smoke.tftest.hclhas blind spots (django_secret_keyname not asserted;can(module.fixtures_bucket.arn)is non-informative), which weakens regression detection — add a.nameassertion and replacecan(...)with a meaningful ARN/value assertion.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/run-infrastructure-smoke.yaml:
- Around line 21-42: The smoke-gate workflow is currently fail-open: when
LOCALSTACK_AUTH_TOKEN is missing, check-secrets only sets has-token=false and
the downstream run-infrastructure-smoke-tests job is skipped, letting
run-infrastructure-bootstrap continue. Update the gating logic in check-secrets
and run-infrastructure-smoke-tests so the pre-deploy gate enforces the intended
behavior when the secret is absent, either by failing the workflow or by
explicitly blocking bootstrap instead of silently no-oping. Verify the chosen
behavior aligns with the optional-secret design and preserves the intended
security/regression gate semantics.
In `@infrastructure/Makefile`:
- Around line 10-23: The Makefile’s Terraform test filter-building logic is
duplicated in run-smoke-tests.sh, so the two paths can drift when test file
naming changes. Extract the shared “discover *.tftest.hcl files, split smoke vs
non-smoke, and assemble -filter args” behavior into one helper script and have
both the Makefile loop and run-smoke-tests.sh call it, using a mode flag such as
exclude-smoke or only-smoke. Keep the existing behavior aligned by reusing the
same helper for the logic currently embedded in the Makefile’s module/test_dir
loop and the script’s smoke-test discovery.
In `@infrastructure/scripts/run-smoke-tests.sh`:
- Around line 115-118: The no-smoke-tests error in the run_smoke_tests.sh flow
is currently written to standard output instead of standard error. Update the
error handling inside the test_count check to match the existing stderr pattern
used earlier in the script by redirecting the echo in that branch to stderr,
keeping the exit behavior unchanged.
- Around line 13-29: Update wait_for_localstack in run-smoke-tests.sh so the
readiness probe also checks that ecr and ssm are available, not just s3, kms,
iam, and sts. Keep the existing curl-based health check and extend the combined
grep condition in wait_for_localstack so the smoke tests that depend on
ecr-cache and parameters do not start until all required LocalStack services are
ready.
- Around line 13-44: The EXIT trap in the LocalStack smoke-test script can fire
before cleanup helpers are defined, causing command-not-found failures and
leaving the container behind. Move the teardown helper definitions for cleanup
and override_s3_lifecycle above the readiness and startup logic in
run-smoke-tests.sh, or register the trap only after those functions exist, so
the trap always resolves the correct symbols.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9a9a6a67-4fc9-4476-b6d2-87de71ff04c9
📒 Files selected for processing (12)
.github/workflows/ci-cd-staging.yaml.github/workflows/run-ci-cd.yaml.github/workflows/run-infrastructure-smoke.yamlcspell/custom-dict.txtinfrastructure/Makefileinfrastructure/README.mdinfrastructure/modules/ecr-cache/.terraform.lock.hclinfrastructure/modules/ecr-cache/tests/smoke.tftest.hclinfrastructure/modules/kms/tests/smoke.tftest.hclinfrastructure/modules/parameters/tests/smoke.tftest.hclinfrastructure/modules/storage/tests/smoke.tftest.hclinfrastructure/scripts/run-smoke-tests.sh
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.
Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5124 +/- ##
=======================================
Coverage 98.73% 98.73%
=======================================
Files 536 536
Lines 16980 16980
Branches 2418 2418
=======================================
Hits 16765 16765
Misses 123 123
Partials 92 92
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Signed-off-by: Adarshkumar0509 <adarshkumarthakur0509@gmail.com>
|



Proposed change
Resolves #5078
Changes:
Checklist