You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires cync-lan 0.16.0. No behaviour change here - this is the
integration side of a library fix, plus the test that should have caught it.
The library read its listening port from a constant frozen when cync_lan.const was first imported. This integration works around that
deliberately: it sets CYNC_PORT from your local_port option before
importing anything from cync_lan, with a comment in __init__.py saying
why. Correct, and load-bearing on nothing but sequencing - the moment
another integration in the same Home Assistant imports the library first,
the workaround stops being available.
The library reads that setting at use time now, so the ordering no longer
matters.
The end-to-end tests were reaching past the option to patch the constant
directly, which is why nothing here noticed. They go through local_port
now, which means the path from the option to the socket is actually covered
for the first time. They also bind an ephemeral port and read back what the
OS assigned, rather than probing for a free one and binding it a moment
later - a race the helper's own docstring described as "possible in
principle and has not been observed", and which running 256 option
combinations in sequence duly observed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Requires cync-lan 0.16.0. No behaviour change here - this is the
integration side of a library fix, plus the test that should have caught it.
The library read its listening port from a constant frozen when
cync_lan.constwas first imported. This integration works around thatdeliberately: it sets
CYNC_PORTfrom yourlocal_portoption beforeimporting anything from
cync_lan, with a comment in__init__.pysayingwhy. Correct, and load-bearing on nothing but sequencing - the moment
another integration in the same Home Assistant imports the library first,
the workaround stops being available.
The library reads that setting at use time now, so the ordering no longer
matters.
The end-to-end tests were reaching past the option to patch the constant
directly, which is why nothing here noticed. They go through
local_portnow, which means the path from the option to the socket is actually covered
for the first time. They also bind an ephemeral port and read back what the
OS assigned, rather than probing for a free one and binding it a moment
later - a race the helper's own docstring described as "possible in
principle and has not been observed", and which running 256 option
combinations in sequence duly observed.
This discussion was created from the release cync_lan (Home Assistant custom_component) v2.13.1.
All reactions