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

remote/exporter: add poll tracking override #1625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Emantor
Copy link
Member

@Emantor Emantor commented Mar 4, 2025

Description

The poll() function tracks whether the local information has changed vs the previous state and only takes the availability into account. Since we now poll() the resource on creation, the local state is immediately updated with the information on the resource. This also means that instead of a "clear" by sending an unavailable resource, we don't send an update to the coordinator in case the resource is still available.

Previously:
Create Resource -> unavailable
poll() -> update to coordinator

Now:
create resource, poll() -> availability stays the same and we skip the information update to the coordinator.

Add an explicit override to the poll function to mark the state as dirty for the first poll().

Checklist

  • PR has been tested

The poll() function tracks whether the local information has changed vs
the previous state and only takes the availability into account. Since
we now poll() the resource on creation, the local state is immediately
updated with the information on the resource. This also means that
instead of a "clear" by sending an unavailable resource, we don't send an
update to the coordinator in case the resource is still available.

Previously:
Create Resource -> unavailable
poll() -> update to coordinator

Now:
create resource, poll() -> availability stays the same and we skip the
information update to the coordinator.

Add an explicit override to the poll function to mark the state as dirty
for the first poll().

Signed-off-by: Rouven Czerwinski <[email protected]>
@Emantor Emantor added the fix label Mar 4, 2025
@Emantor Emantor self-assigned this Mar 4, 2025
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.8%. Comparing base (2ce9e24) to head (86d1214).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1625     +/-   ##
========================================
- Coverage    55.8%   55.8%   -0.1%     
========================================
  Files         170     170             
  Lines       13382   13381      -1     
========================================
- Hits         7469    7468      -1     
  Misses       5913    5913             
Flag Coverage Δ
3.10 55.8% <100.0%> (-0.1%) ⬇️
3.11 55.8% <100.0%> (-0.1%) ⬇️
3.12 55.8% <100.0%> (-0.1%) ⬇️
3.13 55.7% <100.0%> (-0.1%) ⬇️
3.9 55.8% <100.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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

Successfully merging this pull request may close these issues.

1 participant