Skip to content

fix(deps): remove aws-sdk-go v1#311

Merged
andrew-kline merged 2 commits intobrexhq:mainfrom
raphael-ru:raphael/307
Jan 20, 2026
Merged

fix(deps): remove aws-sdk-go v1#311
andrew-kline merged 2 commits intobrexhq:mainfrom
raphael-ru:raphael/307

Conversation

@raphael-ru
Copy link
Contributor

@raphael-ru raphael-ru commented Aug 26, 2025

Description

aws-sdk-go v1 has reached EOL (#312). This removes all remaining references to it.

  • The String helper functions do not exist anymore, so I replaced them based on the source code.
  • xray has a newer version that uses v2. See release notes.
  • Error handling has changed to use smithy as described here.

Motivation and Context

Without these changes tools like Wiz will flag Substation for using EOL software.

How Has This Been Tested?

  • Substation CLI compiles.
  • Tested a few of the examples to see whether they run.
  • I don't really have a good way to test SQS and SNS.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@raphael-ru raphael-ru mentioned this pull request Aug 26, 2025
`aws-sdk-go` v1 has reached EOL. This removes all remaining references
to it.

- The `String` helper functions do not exist anymore.
- `xray` has a newer version that uses v2.
- Error handling has changed to use smithy.
@raphael-ru raphael-ru marked this pull request as ready for review August 26, 2025 00:43
@raphael-ru raphael-ru requested a review from a team as a code owner August 26, 2025 00:43
@greptile-apps
Copy link

greptile-apps bot commented Jan 3, 2026

Greptile Overview

Greptile Summary

This PR successfully removes all aws-sdk-go v1 dependencies and migrates to v2, addressing the EOL issue. The changes include updating import paths, error handling patterns, and removing v1 helper functions.

Key changes:

  • Replaced aws-sdk-go/aws/awserr with smithy-go for error handling in tap.go
  • Updated aws-xray-sdk-go from v1.8.5 to v2.0.0
  • Migrated aws-sdk-go/aws/arn to aws-sdk-go-v2/aws/arn
  • Removed v1 aws.String() helper calls, replacing with direct pointer conversions
  • Added nil checks for batch error response IDs in SNS and SQS transforms

Migration approach:
The pointer conversion approach correctly creates new variables inside the loop (id, msg, body) and takes their addresses, which is safe since these are fresh variables per iteration.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The migration from aws-sdk-go v1 to v2 is correctly implemented with proper pointer conversions and error handling. The author has tested compilation and run some examples. However, SNS and SQS have not been fully tested, which is the main reason for not giving a perfect score.
  • Pay close attention to transform/send_aws_sns.go and transform/send_aws_sqs.go since SNS and SQS functionality was not fully tested

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (2)

  1. transform/send_aws_sns.go, line 211-214 (link)

    logic: If AWS returns nil for r.Id, this will convert to empty string and strconv.Atoi("") will return error "invalid syntax", causing retry to fail

  2. transform/send_aws_sqs.go, line 224-227 (link)

    logic: If AWS returns nil for r.Id, this will convert to empty string and strconv.Atoi("") will return error "invalid syntax", causing retry to fail

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@andrew-kline andrew-kline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good otherwise, thanks for doing this!

@andrew-kline
Copy link
Contributor

@greptileai please re-review

Copy link
Contributor

@andrew-kline andrew-kline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you again!

@andrew-kline andrew-kline merged commit 80777b4 into brexhq:main Jan 20, 2026
5 checks passed
@raphael-ru raphael-ru deleted the raphael/307 branch January 20, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants