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

[MM-48304] AWS SDK v2 migration (final cleanup) #810

Merged
merged 13 commits into from
Jan 9, 2023
Merged

[MM-48304] AWS SDK v2 migration (final cleanup) #810

merged 13 commits into from
Jan 9, 2023

Conversation

fmartingr
Copy link
Contributor

@fmartingr fmartingr commented Dec 25, 2022

⚠️ This PR contains all pending AWS SDK v2 changes (to make it easier for me), so it'll be in draft after everything else is merged into master, refrain from trying to review it until then :)

Pending

Summary

  • Update STS to v2
  • Removed ApplicationAutoscalingAPI, since it was unused.
  • Remove awserr usages
  • Refactor aws/request and aws/session into the v2's aws/config.
  • Remove unnecessary AWS_REGION env var reads (use config)

Ticket Link

https://mattermost.atlassian.net/browse/MM-48304

Release Note

Final AWS SDK v2 upgrade

@fmartingr fmartingr self-assigned this Dec 25, 2022
@mm-cloud-bot mm-cloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Dec 25, 2022
commit 4cc826f
Merge: 6c919de 754bd20
Author: Felipe Martin <me@fmartingr.com>
Date:   Fri Dec 23 12:28:11 2022 +0100

    Merge remote-tracking branch 'upstream/master' into MM-48303

commit 6c919de
Author: Mir Shahriar Sabuj <mir.shahriar@mattermost.com>
Date:   Wed Dec 21 19:31:28 2022 +0600

    updated go mod

commit fcb09bd
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 13:40:10 2022 +0100

    check-style

commit 3799308
Merge: 89c49fe 623b1c0
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 13:34:03 2022 +0100

    Merge remote-tracking branch 'upstream/master' into MM-48303

commit 89c49fe
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 13:33:07 2022 +0100

    ensure there's a page

commit ff68932
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 12:58:26 2022 +0100

    s3 upgrade to sdk v2
commit c3778ab
Merge: ecdc35f 754bd20
Author: Felipe Martin <me@fmartingr.com>
Date:   Fri Dec 23 12:31:47 2022 +0100

    Merge remote-tracking branch 'upstream/master' into MM-48035

commit ecdc35f
Author: Mir Shahriar Sabuj <mir.shahriar@mattermost.com>
Date:   Fri Dec 23 15:05:28 2022 +0600

    update a few logics

commit 758ef93
Merge: 3b7631a 39244ce
Author: Mir Shahriar Sabuj <mir.shahriar@mattermost.com>
Date:   Fri Dec 23 14:51:50 2022 +0600

    Merge remote-tracking branch 'fmartingr/MM-48035' into MM-48035

commit 3b7631a
Author: Felipe Martin <me@fmartingr.com>
Date:   Fri Dec 23 07:57:45 2022 +0100

    revisited ensure methods logic

commit 7c3e959
Author: Felipe Martin <me@fmartingr.com>
Date:   Thu Dec 22 09:42:29 2022 +0100

    revisited ensure database secret logic

commit 21bf97a
Author: Felipe Martin <me@fmartingr.com>
Date:   Thu Dec 22 08:39:21 2022 +0100

    avoid uneccesary check

commit aaecb69
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:12:44 2022 +0100

    lint

commit 74b3e1c
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:06:10 2022 +0100

    check-style

commit 8c03097
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:03:45 2022 +0100

    refactored some repeated logic

commit 164b44e
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 17:19:36 2022 +0100

    secrets manager sdk v2 upgrade

commit 39244ce
Author: Felipe Martin <me@fmartingr.com>
Date:   Fri Dec 23 07:57:45 2022 +0100

    revisited ensure methods logic

commit fdf3294
Author: Felipe Martin <me@fmartingr.com>
Date:   Thu Dec 22 09:42:29 2022 +0100

    revisited ensure database secret logic

commit 621f560
Author: Felipe Martin <me@fmartingr.com>
Date:   Thu Dec 22 08:39:21 2022 +0100

    avoid uneccesary check

commit c11e6e0
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:12:44 2022 +0100

    lint

commit 82f1b58
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:06:10 2022 +0100

    check-style

commit 3376f2f
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 18:03:45 2022 +0100

    refactored some repeated logic

commit 7f7ddeb
Author: Felipe Martin <me@fmartingr.com>
Date:   Wed Dec 21 17:19:36 2022 +0100

    secrets manager sdk v2 upgrade
commit 3703d41
Merge: 8ce0de1 754bd20
Author: Felipe Martin <me@fmartingr.com>
Date:   Fri Dec 23 12:49:39 2022 +0100

    Merge remote-tracking branch 'upstream/master' into MM-49345

commit 8ce0de1
Author: Felipe Martin <me@fmartingr.com>
Date:   Thu Dec 22 19:43:33 2022 +0100

    aws sdk v2 migration for rds, kms, gt
commit e81cf36
Author: Felipe Martin <me@fmartingr.com>
Date:   Sun Dec 25 09:07:21 2022 +0100

    upgrade eks aws sdk to v2
@fmartingr fmartingr marked this pull request as ready for review January 5, 2023 08:32
Copy link
Contributor

@mirshahriar mirshahriar left a comment

Choose a reason for hiding this comment

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

LGTM. Very impressive work.

Copy link
Contributor

@gabrieljackson gabrieljackson left a comment

Choose a reason for hiding this comment

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

Great work wrapping this up! LGTM

@@ -185,16 +178,8 @@ func (c *Client) Service() *Service {
c.logger.WithError(err).Error("Can't load AWS Configuration")
}

// Load session for the V1 SDK
sess, err := NewAWSSessionWithLogger(c.config, c.logger.WithField("tools-aws", "client"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, did you notice any logging differences with how V2 is implemented? I can see they changed a few things here, but guessing logs look similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't seen much difference to be honest, though I usually run everything with --debug --debug-helm, so my logs are a bit noisy.

@fmartingr fmartingr merged commit bfe42a5 into master Jan 9, 2023
@fmartingr fmartingr deleted the MM-48304 branch January 9, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants