Skip to content
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

fix: Set early return when influxdb range is empty #4274

Merged

Conversation

zachaysan
Copy link
Contributor

Changes

The API usage related refactor cropped up a new issue when the set range is effectively empty. Before this change users were getting the right results due to a broad try / except, but we were spamming Sentry with pointless logged errors. This fix early returns to avoid the empty set causing an issue.

How did you test this code?

Wrote a simple unit test.

@zachaysan zachaysan requested a review from a team as a code owner July 2, 2024 13:56
@zachaysan zachaysan requested review from novakzaballa and removed request for a team July 2, 2024 13:56
Copy link

vercel bot commented Jul 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jul 2, 2024 1:56pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Jul 2, 2024 1:56pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Jul 2, 2024 1:56pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Jul 2, 2024
@zachaysan zachaysan requested a review from gagantrivedi July 2, 2024 13:57
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Uffizzi Preview deployment-53730 was deleted.

Copy link

codecov bot commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (c2a33e6) to head (0d580e1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4274   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files        1195     1195           
  Lines       39099    39104    +5     
=======================================
+ Hits        37773    37778    +5     
  Misses       1326     1326           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwell matthewelwell added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit 007351c Jul 9, 2024
28 checks passed
@matthewelwell matthewelwell deleted the fix/set_early_return_when_influxdb_range_is_empty branch July 9, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants