Skip to content

Conversation

@jsalaber
Copy link
Contributor

@jsalaber jsalaber commented Jul 29, 2025

Changes

  • returned eval reasons for cloud bucketing

@jsalaber jsalaber requested a review from a team as a code owner July 29, 2025 18:48
@jsalaber jsalaber requested a review from a team July 29, 2025 18:48
@phaym
Copy link

phaym commented Jul 29, 2025

add `cloud' and 'cloudEvalReason' capabilities to test-harness action to see if it passes here

@jsalaber
Copy link
Contributor Author

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

@jsalaber jsalaber force-pushed the COR-3471-support-cloud-ruby-eval-reasons branch from ae795f0 to 96a17aa Compare July 29, 2025 18:56
@jonathannorris jonathannorris requested a review from Copilot July 29, 2025 19:12
Copy link
Contributor

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.

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>
@jsalaber jsalaber force-pushed the COR-3471-support-cloud-ruby-eval-reasons branch from 4325feb to 320590d Compare July 29, 2025 20:00
@jsalaber jsalaber requested a review from jonathannorris July 29, 2025 20:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jsalaber jsalaber force-pushed the COR-3471-support-cloud-ruby-eval-reasons branch from 320590d to 15eb7fc Compare July 30, 2025 14:51
@jsalaber jsalaber enabled auto-merge (squash) July 30, 2025 14:55
@jsalaber jsalaber merged commit c778707 into main Jul 30, 2025
8 checks passed
@jsalaber jsalaber deleted the COR-3471-support-cloud-ruby-eval-reasons branch July 30, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants