diff --git a/build_tools/services.rb b/build_tools/services.rb index c5b9c50cfc2..8ffcb455354 100644 --- a/build_tools/services.rb +++ b/build_tools/services.rb @@ -9,10 +9,10 @@ class ServiceEnumerator MANIFEST_PATH = File.expand_path('../../services.json', __FILE__) # Minimum `aws-sdk-core` version for new gem builds - MINIMUM_CORE_VERSION = "3.241.4" + MINIMUM_CORE_VERSION = "3.243.1" # Minimum `aws-sdk-core` version for new S3 gem builds - MINIMUM_CORE_VERSION_S3 = "3.243.0" + MINIMUM_CORE_VERSION_S3 = "3.243.1" EVENTSTREAM_PLUGIN = "Aws::Plugins::EventStreamConfiguration" diff --git a/gems/aws-sdk-core/CHANGELOG.md b/gems/aws-sdk-core/CHANGELOG.md index a2d2f149b46..3309d5bbeda 100644 --- a/gems/aws-sdk-core/CHANGELOG.md +++ b/gems/aws-sdk-core/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased Changes ------------------ +* Issue - Fix waiter error matcher to handle both boolean and boolean-string acceptors. + 3.243.0 (2026-03-05) ------------------ diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb b/gems/aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb index 654350f54b1..99801607921 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb @@ -97,8 +97,8 @@ def matches_status?(acceptor, response) def matches_error?(acceptor, response) case acceptor['expected'] - when 'false' then response.error.nil? - when 'true' then !response.error.nil? + when 'false', false then response.error.nil? + when 'true', true then !response.error.nil? else response.error.is_a?(Aws::Errors::ServiceError) && response.error.code == acceptor['expected'].delete('.') diff --git a/gems/aws-sdk-core/spec/aws/waiters_spec.rb b/gems/aws-sdk-core/spec/aws/waiters_spec.rb index acf59fbffb7..9ee5b42d0f1 100644 --- a/gems/aws-sdk-core/spec/aws/waiters_spec.rb +++ b/gems/aws-sdk-core/spec/aws/waiters_spec.rb @@ -221,8 +221,12 @@ module Waiters context 'expected is true' do it 'succeeds when matched with any error' do client.stub_responses(:waiter_operation, RuntimeError.new) - expect { client.wait_until(:error_matcher_with_true) } - .not_to raise_error + expect { client.wait_until(:error_matcher_with_true) }.not_to raise_error + end + + it 'succeeds when matched with any error' do + client.stub_responses(:waiter_operation, RuntimeError.new) + expect { client.wait_until(:error_matcher_with_boolean_true) }.not_to raise_error end end @@ -233,8 +237,12 @@ module Waiters 'ResourceNotFoundException', { complex_object: { string_member: 'expected' } } ) - expect { client.wait_until(:error_matcher_with_false) } - .not_to raise_error + expect { client.wait_until(:error_matcher_with_false) }.not_to raise_error + end + + it 'succeeds when no error is received' do + client.stub_responses(:waiter_operation, complex_object: { string_member: 'expected' }) + expect { client.wait_until(:error_matcher_with_boolean_false) }.not_to raise_error end it 'fails when matched' do diff --git a/gems/aws-sdk-core/spec/fixtures/waiters/waiters.json b/gems/aws-sdk-core/spec/fixtures/waiters/waiters.json index 9bb7b7386a2..e33399c3178 100644 --- a/gems/aws-sdk-core/spec/fixtures/waiters/waiters.json +++ b/gems/aws-sdk-core/spec/fixtures/waiters/waiters.json @@ -383,6 +383,30 @@ "argument": "BooleanList" } ] + }, + "ErrorMatcherWithBooleanTrue": { + "delay": 0, + "operation": "WaiterOperation", + "maxAttempts": 25, + "acceptors": [ + { + "matcher": "error", + "expected": true, + "state": "success" + } + ] + }, + "ErrorMatcherWithBooleanFalse": { + "delay": 0, + "operation": "WaiterOperation", + "maxAttempts": 25, + "acceptors": [ + { + "matcher": "error", + "expected": false, + "state": "success" + } + ] } } } \ No newline at end of file