Skip to content

Comments

remote/exporter: add poll tracking override#1625

Closed
Emantor wants to merge 1 commit intolabgrid-project:masterfrom
Emantor:topic/exporter-fix-initial-poll
Closed

remote/exporter: add poll tracking override#1625
Emantor wants to merge 1 commit intolabgrid-project:masterfrom
Emantor:topic/exporter-fix-initial-poll

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 <r.czerwinski@pengutronix.de>
@Emantor Emantor added the fix label Mar 4, 2025
@Emantor Emantor self-assigned this Mar 4, 2025
@codecov
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).
⚠️ Report is 136 commits behind head on master.

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 56.1% <100.0%> (-0.1%) ⬇️
3.11 56.1% <100.0%> (-0.1%) ⬇️
3.12 56.1% <100.0%> (-0.1%) ⬇️
3.13 56.0% <100.0%> (-0.1%) ⬇️
3.9 56.1% <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.

@Emantor Emantor closed this Jun 19, 2025
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