fix: remove stale .env.example entries and align S3 env vars with code#556
Conversation
📝 WalkthroughWalkthrough
ChangesEnvironment example updates
Estimated code review effort 🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Actionable comments posted: 1
🤖 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 @.env.example:
- Around line 68-78: The `S3_BUCKET` example is commented out in `.env.example`,
but `src/config/env.ts` expects it for S3 usage and falls back to an empty value
when missing. Keep `S3_BUCKET` active and visible in the example so fresh setups
know to set it, while leaving `S3_REGION` commented since `AWS_REGION` already
provides the default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # ── S3 / KYC document storage (B-062) ──────────────────────────────────────── | ||
| # S3 bucket for KYC document uploads (must be private — no public access) | ||
| AWS_S3_KYC_BUCKET=acbu-kyc-documents | ||
| # S3_BUCKET=acbu-kyc-documents | ||
| # AWS region for S3 (defaults to AWS_REGION if set) | ||
| AWS_S3_REGION=us-east-1 | ||
| # AWS_REGION=us-east-1 | ||
| # S3_REGION=us-east-1 | ||
| # Explicit credentials — omit to use IAM role / instance profile in production | ||
| AWS_ACCESS_KEY_ID=your-access-key-id | ||
| AWS_SECRET_ACCESS_KEY=your-secret-access-key | ||
| # Optional: S3-compatible endpoint for local dev (e.g. MinIO) | ||
| # AWS_S3_ENDPOINT=http://localhost:9000 | ||
| # S3_ENDPOINT=http://localhost:9000 |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- .env.example relevant slice ---'
nl -ba .env.example | sed -n '60,90p'
echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .Repository: Pi-Defi-world/acbu-backend
Length of output: 240
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- .env.example relevant slice ---'
nl -ba .env.example | sed -n '60,90p'
echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .Repository: Pi-Defi-world/acbu-backend
Length of output: 240
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- .env.example relevant slice ---'
sed -n '60,90p' .env.example
echo
echo '--- search S3 env references ---'
rg -n --hidden --glob '!.git' 'S3_BUCKET|S3_REGION|S3_ENDPOINT|AWS_REGION|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY' .Repository: Pi-Defi-world/acbu-backend
Length of output: 2882
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- s3.bucket usages ---'
rg -n --hidden --glob '!.git' 's3\.bucket|env\.s3\.bucket|S3_BUCKET' src ENV_VARS.md
echo
echo '--- env.ts S3 block ---'
sed -n '150,175p' src/config/env.tsRepository: Pi-Defi-world/acbu-backend
Length of output: 2072
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- s3.bucket usages ---'
rg -n --hidden --glob '!.git' 's3\.bucket|env\.s3\.bucket|S3_BUCKET' src ENV_VARS.md
echo
echo '--- env.ts S3 block ---'
sed -n '150,175p' src/config/env.tsRepository: Pi-Defi-world/acbu-backend
Length of output: 2072
Keep S3_BUCKET active in .env.example:68-78.
src/config/env.ts uses S3_BUCKET for every S3 operation, and it defaults to an empty string when unset. S3_REGION can stay commented because AWS_REGION already covers the default region, but the bucket name should be visible for fresh setups.
🤖 Prompt for 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.
In @.env.example around lines 68 - 78, The `S3_BUCKET` example is commented out
in `.env.example`, but `src/config/env.ts` expects it for S3 usage and falls
back to an empty value when missing. Keep `S3_BUCKET` active and visible in the
example so fresh setups know to set it, while leaving `S3_REGION` commented
since `AWS_REGION` already provides the default.
|
@elijahbok14-sudo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Closes #453
This PR removes stale environment variable entries from
.env.exampleand aligns the S3/KYC configuration section with the env names actually consumed by the backend code.Changes:
BULK_TRANSFER_*variablesAWS_S3_*config names with the supportedS3_*/AWS_*variants used bysrc/config/env.tsSummary by CodeRabbit