From 52288ccae37cbb185290fe816331cf02605ef3dd Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Thu, 8 Aug 2024 08:08:25 -0700 Subject: [PATCH] Updates based on pr --- gems/aws-sdk-core/CHANGELOG.md | 2 +- gems/aws-sdk-core/lib/aws-sdk-core.rb | 2 +- gems/aws-sdk-resources/CHANGELOG.md | 2 ++ gems/aws-sdk-resources/bin/aws-v3.rb | 3 ++- tasks/update-aws-sdk-dependencies.rake | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gems/aws-sdk-core/CHANGELOG.md b/gems/aws-sdk-core/CHANGELOG.md index 786ffd53407..fb49e622713 100644 --- a/gems/aws-sdk-core/CHANGELOG.md +++ b/gems/aws-sdk-core/CHANGELOG.md @@ -1,7 +1,7 @@ Unreleased Changes ------------------ -* Feature - Reduce initial memory usage by auto-loading bundled gems (STS, SSO, SSOOIDC). +* Issue - Reduce initial memory usage by auto-loading bundled gems (STS, SSO, SSOOIDC). 3.201.3 (2024-07-23) ------------------ diff --git a/gems/aws-sdk-core/lib/aws-sdk-core.rb b/gems/aws-sdk-core/lib/aws-sdk-core.rb index 89296cbfcae..9a97bff6715 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core.rb @@ -200,7 +200,7 @@ def eager_autoload!(*args) # Autoload bundled service gems used in credential providers # need to ensure that the files are the local files from aw-sdk-core -# and not the install, legacy/dummy service gems. +# and not the installed, legacy/dummy service gems. # aws-sdk-sts is included to support Aws::AssumeRoleCredentials Aws.autoload :STS, File.join(__dir__, 'aws-sdk-sts.rb') diff --git a/gems/aws-sdk-resources/CHANGELOG.md b/gems/aws-sdk-resources/CHANGELOG.md index f2634716895..4a5c7c847fb 100644 --- a/gems/aws-sdk-resources/CHANGELOG.md +++ b/gems/aws-sdk-resources/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased Changes ------------------ +* Issue - Remove autoloads for service gems bundled in `aws-sdk-core` (STS, SSO, SSOOIDC). + 3.200.0 (2024-08-01) ------------------ diff --git a/gems/aws-sdk-resources/bin/aws-v3.rb b/gems/aws-sdk-resources/bin/aws-v3.rb index 099de1a2cbc..44886eef2c4 100755 --- a/gems/aws-sdk-resources/bin/aws-v3.rb +++ b/gems/aws-sdk-resources/bin/aws-v3.rb @@ -106,7 +106,8 @@ def env_bool key, default # The Aws namespace used to check autoload requires aws-sdk-resources. require 'aws-sdk-resources' -# Finally load all of the gems. Core is loaded a second time because of STS. +# Finally load all of the gems. +# Don't update the load path for gems bundled in core. core_gems = [:STS, :SSO, :SSOOIDC] if File.directory?(File.expand_path('../../../../build_tools', __FILE__)) gems = [] diff --git a/tasks/update-aws-sdk-dependencies.rake b/tasks/update-aws-sdk-dependencies.rake index dd5827d747a..bbd8774304d 100644 --- a/tasks/update-aws-sdk-dependencies.rake +++ b/tasks/update-aws-sdk-dependencies.rake @@ -19,6 +19,7 @@ task 'update-aws-sdk-dependencies' do ) # update the module autoloads + # Remove service gems bundled in core (eg, sts) that have gem_name of aws-sdk-core. autoload_services = BuildTools::Services.select { |svc| svc.gem_name != 'aws-sdk-core' } BuildTools.replace_lines( filename: "#{$GEMS_DIR}/aws-sdk-resources/lib/aws-sdk-resources.rb",