Skip to content

Commit

Permalink
Add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Jan 13, 2024
1 parent ba8fc09 commit 907ca42
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
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 - Add mutex around accessing stub api_requests.

3.190.2 (2024-01-09)
------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,10 @@ def _discover_endpoint(ctx, required)
elsif ctx.config.endpoint_discovery
# not required for the operation
# but enabled
puts "Checking cache key: #{key}"
if cache.key?(key)
puts "We have it, returning"
cache[key]
elsif ctx.config.active_endpoint_cache
# enabled active cache pull
puts "Active cache"
interval = ctx.config.endpoint_cache_poll_interval
if key.include?('_')
# identifier related, kill the previous polling thread by key
Expand All @@ -139,10 +136,8 @@ def _discover_endpoint(ctx, required)

# start a thread for polling endpoints when non-exist
unless cache.threads_key?(key)
puts "Starting a new thread, interval: #{interval}"
thread = Thread.new do
while !cache.key?(key) do
puts "polling cahce for update for #{key}"
cache.update(key, ctx)
sleep(interval)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ module Plugins
)
c.operation_not_required(foo: 'foo')
sleep(0.1)
expect(c.co.size).to eq(3)
expect(c.api_requests.size).to eq(3)
c.operation_not_required(foo: 'foo')
expect(c.api_requests.size).to eq(4)
end
Expand Down

0 comments on commit 907ca42

Please sign in to comment.