Skip to content

Commit

Permalink
fixed ratelimiter config
Browse files Browse the repository at this point in the history
Signed-off-by: Ketan Umare <[email protected]>
  • Loading branch information
kumare3 committed Apr 5, 2024
1 parent eb10118 commit 87a5e3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ func TestNewResourceCache(t *testing.T) {
t.Run("Simple", func(t *testing.T) {
c, err := NewResourceCache(context.Background(), "Cache1", &mocks.Client{}, webapi.CachingConfig{
Size: 10,
}, promutils.NewTestScope())
}, webapi.RateLimiterConfig{QPS: 1, Burst: 1}, promutils.NewTestScope())
assert.NoError(t, err)
assert.NotNil(t, c)
})

t.Run("Error", func(t *testing.T) {
_, err := NewResourceCache(context.Background(), "Cache1", &mocks.Client{}, webapi.CachingConfig{},
webapi.RateLimiterConfig{},
promutils.NewTestScope())
assert.Error(t, err)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func createRemotePlugin(pluginEntry webapi.PluginEntry, c clock.Clock) core.Plug
}

resourceCache, err := NewResourceCache(ctx, pluginEntry.ID, p, p.GetConfig().Caching,
iCtx.MetricsScope().NewSubScope("cache"))
p.GetConfig().ReadRateLimiter, iCtx.MetricsScope().NewSubScope("cache"))

Check warning on line 194 in flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go#L194

Added line #L194 was not covered by tests

if err != nil {
return nil, err
Expand Down

0 comments on commit 87a5e3c

Please sign in to comment.