Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade aws-sdk-go from v1 to v2 #24720

Merged
merged 5 commits into from
Jan 9, 2025
Merged

Conversation

mismithhisler
Copy link
Member

Description

Upgrades aws-sdk-go from v1 to v2 as the v1 library is in maintenance mode.

Closes GH #24680

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

@tgross
Copy link
Member

tgross commented Dec 19, 2024

@mismithhisler can you check the impact of this change on binary size? In #24701 I noted that updating this library doesn't update the dependencies that have it as a transient dependency for v1, and so we'll be carrying around both versions.

@mismithhisler
Copy link
Member Author

mismithhisler commented Dec 19, 2024

@mismithhisler can you check the impact of this change on binary size? In #24701 I noted that updating this library doesn't update the dependencies that have it as a transient dependency for v1, and so we'll be carrying around both versions.

@tgross I saw that and using go mod why it looks indirectly needed via the go-getter library.

It looks like it added 2.7MB to the binary size.

@tgross
Copy link
Member

tgross commented Dec 19, 2024

It looks like it added 2.7MB to the binary size.

Eh, ok. That stinks but not worth delaying the fix for. It'd be nice if we could nudge along the other HashiCorp libraries that are pulling this in.

@mismithhisler mismithhisler marked this pull request as ready for review December 19, 2024 19:07
@mismithhisler mismithhisler requested review from a team as code owners December 19, 2024 19:07
tgross
tgross previously approved these changes Dec 19, 2024
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM!

client/fingerprint/env_aws.go Outdated Show resolved Hide resolved
e2e/remotetasks/remotetasks.go Show resolved Hide resolved
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Thanks for doing this @mismithhisler! I've added a couple of inline comments/questions which would be good to resolve before merging but looks and works great.

I ran this locally on macOS and everything looked OK, with the correct message showing up in the logs:

client.fingerprint_mgr.env_aws: error querying AWS IDMS URL, skipping

I then ran this PR on an AWS cluster and the node attributes looked how I would expect:

$ nomad node status -verbose bd306835 |grep aws
kernel.version                           = 6.8.0-1009-aws
platform.aws.ami-id                      = ami-0474244c88b835731
platform.aws.instance-life-cycle         = on-demand
platform.aws.instance-type               = m5.xlarge
platform.aws.placement.availability-zone = eu-west-2a
unique.platform.aws.hostname             = ip-10-0-1-15.eu-west-2.compute.internal
unique.platform.aws.instance-id          = i-0765dd85a71bc86bb
unique.platform.aws.local-hostname       = ip-10-0-1-15.eu-west-2.compute.internal
unique.platform.aws.local-ipv4           = 10.0.1.15
unique.platform.aws.mac                  = 06:72:45:96:05:15
unique.platform.aws.public-ipv4          = xx.xxx.xxx.xxx

The output from the same Nomad client running the official v1.9.4 release:

$ nomad node status -verbose bd306835 |grep aws
kernel.version                           = 6.8.0-1009-aws
platform.aws.ami-id                      = ami-0474244c88b835731
platform.aws.instance-life-cycle         = on-demand
platform.aws.instance-type               = m5.xlarge
platform.aws.placement.availability-zone = eu-west-2a
unique.platform.aws.hostname             = ip-10-0-1-15.eu-west-2.compute.internal
unique.platform.aws.instance-id          = i-0765dd85a71bc86bb
unique.platform.aws.local-hostname       = ip-10-0-1-15.eu-west-2.compute.internal
unique.platform.aws.local-ipv4           = 10.0.1.15
unique.platform.aws.mac                  = 06:72:45:96:05:15
unique.platform.aws.public-ipv4          = xx.xxx.xxx.xxx

e2e/remotetasks/remotetasks.go Show resolved Hide resolved
client/fingerprint/env_aws.go Show resolved Hide resolved
client/fingerprint/env_aws.go Outdated Show resolved Hide resolved
client/fingerprint/env_aws.go Outdated Show resolved Hide resolved
client/fingerprint/env_aws.go Outdated Show resolved Hide resolved
client/fingerprint/env_aws.go Show resolved Hide resolved
go.mod Show resolved Hide resolved
tgross
tgross previously approved these changes Jan 9, 2025
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! Nice refactoring work on the error/response body reading.

@mismithhisler mismithhisler added backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.9.x backport to 1.9.x release line labels Jan 9, 2025
@mismithhisler mismithhisler merged commit 606ce9d into main Jan 9, 2025
30 checks passed
@mismithhisler mismithhisler deleted the deps-upgrade-aws-sdk-to-v2 branch January 9, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.9.x backport to 1.9.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deps: migrate github.com/aws/aws-sdk-go to v2
5 participants