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: Condition Sets Incorrectly Evaluate Infrequent Telemetry Updates #8002

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Pranaykarvi
Copy link

@Pranaykarvi Pranaykarvi commented Feb 16, 2025

Issue #7992

Condition sets can incorrectly evaluate telemetry objects that update infrequently due to short-circuit evaluation. This causes stale results and incorrect conditional styling. The issue occurs because the evaluation stops when a condition evaluates to true, preventing subsequent conditions from being re-evaluated with the latest telemetry data.

Fix

Removed short-circuiting in the updateConditionResults method to ensure all conditions are re-evaluated with the latest telemetry data. This prevents stale results and ensures that the condition set's state is always accurate.

Changes

  • Modified updateConditionResults to iterate over all conditions and update their results, regardless of whether a previous condition evaluated to true.

Impact

  • Fixes incorrect evaluation of condition sets for infrequently updated telemetry.
  • Prevents stale results and ensures accurate conditional styling.
  • No expected performance impact for small to medium-sized condition sets.

Copy link

codecov bot commented Feb 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.30%. Comparing base (28b5d7c) to head (55def76).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8002      +/-   ##
==========================================
- Coverage   57.58%   57.30%   -0.28%     
==========================================
  Files         678      678              
  Lines       27440    27439       -1     
  Branches     2694     2694              
==========================================
- Hits        15800    15724      -76     
- Misses      11297    11372      +75     
  Partials      343      343              
Flag Coverage Δ
e2e-ci 62.83% <100.00%> (+<0.01%) ⬆️
e2e-full 23.64% <0.00%> (-18.35%) ⬇️
unit 49.36% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
src/plugins/condition/ConditionManager.js 87.69% <100.00%> (-0.07%) ⬇️

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28b5d7c...55def76. Read the comment docs.

@Pranaykarvi
Copy link
Author

Pranaykarvi commented Feb 16, 2025

@akhenry Could you please review and approve this PR? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant