Skip to content

Conversation

sighphyre
Copy link
Member

@sighphyre sighphyre commented Apr 14, 2025

Fixes an issue where the SDK would attempt to report an empty bucket but would send a format that lacked everything Unleash needed to process it and would continue to do that every metrics_interval until the SDK received an evaluation for a toggle.

Needs this to pass

Copy link

@Copilot 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 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

lib/unleash/metrics_reporter.rb:41

  • Consider adding tests for the scenario where Unleash.engine.get_metrics returns nil to verify that the fallback report (with 'start', 'stop', and 'toggles') is generated and sent correctly after 10 minutes.
if report.nil?

Copy link
Member

@chriswk chriswk left a comment

Choose a reason for hiding this comment

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

LRTM (Looks reasonable to me)

@github-project-automation github-project-automation bot moved this from New to Approved PRs in Issues and PRs Apr 14, 2025
@sighphyre sighphyre force-pushed the fix/metrics-to-send-correct-empty-buckets branch from ad9ad07 to f11c2a5 Compare April 14, 2025 12:08
@coveralls
Copy link

coveralls commented Apr 14, 2025

Pull Request Test Coverage Report for Build 14445218978

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 95.378%

Totals Coverage Status
Change from base Build 14444351167: 0.09%
Covered Lines: 454
Relevant Lines: 476

💛 - Coveralls

@sighphyre sighphyre merged commit 5310774 into main Apr 14, 2025
47 checks passed
@sighphyre sighphyre deleted the fix/metrics-to-send-correct-empty-buckets branch April 14, 2025 12:29
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Issues and PRs Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants