fix(clp-rust-utils): Configure AWS region and credentials in base config to avoid default provider resolution (fixes #1915).#1931
Conversation
WalkthroughApplied minor refactor to AWS client initialization in S3 and SQS: credential provider id updated, credentials and region are applied before calling Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
junhaoliao
left a comment
There was a problem hiding this comment.
validated the fix worked correctly:
- No IMDS delays: Job creation + S3 client initialization completed in ~230-307ms (vs. 3+ seconds before the fix)
- No spurious WARN logs: Zero "failed to load region from IMDS" messages
task docker-images:packagethen modify tools/deployment/package-helm/set-up-test.sh
# Load the locally-built clp-package image into kind
repo_root="${script_dir}/../../../"
iid_file="${repo_root}/build/clp-package-image.id"
if [[ -f "$iid_file" ]]; then
image_id=$(<"$iid_file")
user="${USER:-$(id -un 2>/dev/null || whoami 2>/dev/null || echo unknown)}"
short_id="${image_id#sha256:}"
short_id="${short_id:0:4}"
image_tag="dev-${user}-${short_id}"
echo "Loading clp-package:${image_tag} into kind cluster..."
kind load docker-image "clp-package:${image_tag}" --name "${CLUSTER_NAME}"
else
echo "ERROR: No locally-built image found at ${iid_file}. Run 'task docker-images:package' first."
exit 1
fiThen Helm install with overrides to use the local image:
helm install test "${script_dir}" \
--set "image.clpPackage.repository=clp-package" \
--set "image.clpPackage.tag=${image_tag}" \
--set "image.clpPackage.pullPolicy=Never"then tested with the instructions at #1913
junhaoliao
left a comment
There was a problem hiding this comment.
we can rename let credential -> let credentials
the rest lgtm
junhaoliao
left a comment
There was a problem hiding this comment.
for the title, how about:
fix(clp-rust-utils): Configure AWS region and credentials in base config to avoid default provider resolution (fixes #1915).
…fig to avoid default provider resolution (fixes y-scope#1915). (y-scope#1931)
Description
As the title suggests, this PR implements the suggested fix in #1915 to avoid unnecessary IMDS lookups.
Checklist
breaking change.
Validation performed
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.