-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support cloud eval reasons #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
add `cloud' and 'cloudEvalReason' capabilities to test-harness action to see if it passes here |
it failed all the cloud tests in my previous pr, there's a ticket + pr to fix it |
ae795f0 to
96a17aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for cloud evaluation reasons in the DevCycle Ruby SDK. The changes enable tracking and returning of evaluation reasons when variables are retrieved from the cloud bucketing service.
- Added eval reasons support to the Variable model to include reason and details for variable evaluations
- Enhanced error handling to provide specific evaluation reasons for different failure scenarios (missing variable, type mismatch, etc.)
- Added comprehensive test coverage using WebMock to verify eval reasons are properly returned
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/devcycle-ruby-server-sdk/models/variable.rb | Added eval field to Variable model to store evaluation reasons |
| lib/devcycle-ruby-server-sdk/eval_reasons.rb | Added new evaluation reason detail constants for type mismatch, missing variable, and error scenarios |
| lib/devcycle-ruby-server-sdk/api/client.rb | Enhanced variable retrieval logic to handle type mismatches and include eval reasons in error responses |
| spec/spec_helper.rb | Added WebMock dependency for HTTP request mocking in tests |
| spec/api/devcycle_api_spec.rb | Added comprehensive test coverage for eval reasons including mocked API responses |
| Gemfile | Added webmock gem dependency for testing |
Comments suppressed due to low confidence (1)
spec/api/devcycle_api_spec.rb:74
- This test assumes the eval field contains specific values, but there's no setup or stubbing to ensure the API returns eval data. Without mocking, this test depends on the actual API behavior which may not be reliable.
expect(result.eval[:reason]).to eq "DEFAULT"
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4325feb to
320590d
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
320590d to
15eb7fc
Compare
Changes