🐞 Deleting election event does not remove the S3 event document files#2681
🐞 Deleting election event does not remove the S3 event document files#2681BelSequent wants to merge 8 commits into
Conversation
|
All contributors have signed the CLA. ✅ |
| info!("Listing objects"); | ||
| let list_output = match client | ||
| .list_objects_v2() | ||
| .bucket(s3_bucket.clone()) | ||
| .prefix(prefix.clone()) | ||
| .bucket(bucket_name.clone()) | ||
| .prefix(list_prefix.clone()) |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Applied in fdf1462 (refined in 7566573): Replaced brittle string-based error matching with AWS SDK error metadata via ProvideErrorMetadata::code(). Now explicitly handles NoSuchBucket (returns Ok, nothing to delete) and AccessDenied (returns descriptive error) instead of searching for "NoSuchKey" in formatted debug output.
| fn build_s3_config_for_endpoint( | ||
| sdk_config: &aws_config::SdkConfig, | ||
| endpoint_uri: &str, | ||
| ) -> s3::Config { | ||
| let access_key_result = env::var("AWS_S3_ACCESS_KEY"); |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Applied in ae6e371 (with doc follow-ups in 576c5e0 and 7e4ef37): I removed the duplicated endpoint/credential builder from services/s3.rs and now reuse a shared helper in util/aws.rs so both paths stay aligned.
Agent-Logs-Url: https://github.com/sequentech/step/sessions/75612038-8c39-4295-a386-86175cac5f1c Co-authored-by: BelSequent <178146277+BelSequent@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sequentech/step/sessions/75612038-8c39-4295-a386-86175cac5f1c Co-authored-by: BelSequent <178146277+BelSequent@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sequentech/step/sessions/75612038-8c39-4295-a386-86175cac5f1c Co-authored-by: BelSequent <178146277+BelSequent@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sequentech/step/sessions/5c790503-b81c-4eb3-b202-44f39542db4d Co-authored-by: BelSequent <178146277+BelSequent@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sequentech/step/sessions/5c790503-b81c-4eb3-b202-44f39542db4d Co-authored-by: BelSequent <178146277+BelSequent@users.noreply.github.com>
Parent issue: https://github.com/sequentech/meta/issues/11995