Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build_tools/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions gems/aws-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
------------------

Expand Down
4 changes: 2 additions & 2 deletions gems/aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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('.')
Expand Down
16 changes: 12 additions & 4 deletions gems/aws-sdk-core/spec/aws/waiters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions gems/aws-sdk-core/spec/fixtures/waiters/waiters.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
}
}
Loading