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

Emit ControllerAddress changed signal in SwitchController method #968

Conversation

engelmi
Copy link
Member

@engelmi engelmi commented Oct 24, 2024

Relates to: #964

The changed signal for the agents ControllerAddress property was emitted only in the agent_reconnect function when a change in the address has been detected. This, however, led to the agent first emitting a status disconnected signal and then the address changed signal when the SwitchAddress API has been called. The order of these signals should be reversed.
The address changed signal is now also emitted inside the SwitchController API function which changes the address. In order to get the up-to-date value in the orch_addr field, the new value is set here as well.
The ControllerAddress property changed signal will still be emitted in the reconnect function to ensure any change in the address due to name resolution is considered.

@coveralls
Copy link

coveralls commented Oct 24, 2024

Coverage Status

coverage: 83.267% (-0.02%) from 83.286%
when pulling 29c572d on engelmi:add-agent-address-changed-signal-to-switch-method
into 93644fb on eclipse-bluechi:main.

src/agent/agent.c Outdated Show resolved Hide resolved
@engelmi engelmi force-pushed the add-agent-address-changed-signal-to-switch-method branch from 8251586 to 0957b90 Compare October 25, 2024 10:56
@engelmi
Copy link
Member Author

engelmi commented Oct 25, 2024

/packit retest-failed

1 similar comment
@engelmi
Copy link
Member Author

engelmi commented Oct 25, 2024

/packit retest-failed

The changed signal for the agents ControllerAddress property
was emitted only in the agent_reconnect function when a
change in the address has been detected. This, however, led
to the agent first emitting a status disconnected signal
and then the address changed signal when the SwitchAddress
API has been called. The order of these signals should be
reversed.
The address changed signal is now also emitted inside the
SwitchController API function which changes the address.
In order to get the up-to-date value in the orch_addr field,
the new value is set here as well.
The ControllerAddress property changed signal will still be
emitted in the reconnect function to ensure any change in
the address due to name resolution is considered.

Signed-off-by: Michael Engel <[email protected]>
@engelmi engelmi force-pushed the add-agent-address-changed-signal-to-switch-method branch from 0957b90 to 95ffd63 Compare October 28, 2024 13:35
src/agent/agent.c Outdated Show resolved Hide resolved
@engelmi
Copy link
Member Author

engelmi commented Oct 29, 2024

/packit retest-failed

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mkemel mkemel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@engelmi engelmi merged commit 214c8fb into eclipse-bluechi:main Oct 29, 2024
22 checks passed
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.

4 participants