Skip to content

Conversation

@zhukaihan
Copy link
Collaborator

Summary

Adding open timeout.

module AmplitudeExperiment
  client = RemoteEvaluationClient.new("client-v0KqDA8KnJE4JHS3ZDaQTiwgjZENDMiR", RemoteEvaluationConfig.new(open_timeout_millis: 1, fetch_retries: 1, debug: true))
  client.fetch(User.new(user_id: "test_user", device_id: "test_device"))
end

Now causes:

D, [2025-04-06T23:23:10.319547 #3019] DEBUG -- : [Experiment] Fetching variants for user: {"device_id"=>"test_device", "user_id"=>"test_user"}
E, [2025-04-06T23:23:10.349484 #3019] ERROR -- : [Experiment] Fetch failed: execution expired
D, [2025-04-06T23:23:10.349530 #3019] DEBUG -- : [Experiment] Retrying fetch
E, [2025-04-06T23:23:10.854912 #3019] ERROR -- : [Experiment] Retry failed: execution expired
E, [2025-04-06T23:23:10.855015 #3019] ERROR -- : [Experiment] Retry Fetch failed: uncaught throw #<Net::OpenTimeout: execution expired>
E, [2025-04-06T23:23:10.855033 #3019] ERROR -- : [Experiment] Failed to fetch variants: execution expired

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@zhukaihan zhukaihan marked this pull request as ready for review April 8, 2025 17:18
@zhukaihan zhukaihan requested review from bgiori, Copilot and tyiuhc and removed request for bgiori April 8, 2025 17:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

@zhukaihan zhukaihan merged commit 94d2a94 into main Apr 9, 2025
4 checks passed
@zhukaihan zhukaihan deleted the add-open-timeout branch April 9, 2025 17:23
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
# [1.6.0](v1.5.0...v1.6.0) (2025-06-10)

### Bug Fixes

* update gemspec and release action ([8bd973b](8bd973b))

### Features

* added connect timeout ([#72](#72)) ([94d2a94](94d2a94))
* local evaluation reimplementation in pure ruby ([#69](#69)) ([2a26335](2a26335))
@github-actions
Copy link

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants