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

map of properties constructor should not emit PropertiesChanged signals #55

Open
bradbishop opened this issue Dec 7, 2020 · 2 comments
Assignees

Comments

@bradbishop
Copy link
Member

I suspect the signals in the ObjectManager and Properties interfaces are/were conflated by someone at some point. It probably does make sense to emit an InterfacesAdded signal here by default. It probably does not ever make sense to emit PropertiesChanged signals here (which is what happens by default when this constructor is used):

Definitions::Definitions(bus::bus& bus, const char* path,
                           const std::map<std::string, PropertiesVariant>& vals,
                           bool skipSignal)
        : Definitions(bus, path)
{
    for (const auto& v : vals)
    {
        setPropertyByName(v.first, v.second, skipSignal);
    }
}
@williamspatrick
Copy link
Member

It is pretty straight-forward to switch that constructor's skipSignal parameter to be unused and switch the setPropertyByName call to always true. Any idea if any code it using that besides phosphor-inventory-manager? How do we test that we don't break anyone else's assumptions?

@williamspatrick williamspatrick self-assigned this Dec 7, 2020
@mine260309
Copy link
Contributor

It could be hard to figure out which code depends on this behavior.
It looks like to me that the code using Definitions should pass the skipSignal with expected value, instead of change the default behavior of sdbusplus.

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

No branches or pull requests

3 participants