Open julianbrost opened 3 years ago
Hi! I am in an intro to swe class that is requiring me to work on my first open-source project. I was wondering if this issue is still open and if so could is this beginner-friendly?
Hi, thanks for your interest in contributing. This issue is still open and the resulting fix won't need any major code changes, however, the issue requires a good understanding of Icinga 2 and especially its cluster functionality to come up with a meaningful new suggestion for naming things.
What about GetEndpointZone() for referring to the zone of specifically the endpoint?
Currently, there exist both
ConfigObject::GetZone()
andEndpoint::GetZone()
. AsEndpoint
inherits fromConfigObject
, it is shadowed but both are non-virtual and behave differently:ConfigObject::GetZone()
returns the zone that the object is configured within and is relevant for the config sync.Endpoint::GetZone()
returns the zone that endpoint is a member of (as configured in theendoints
attribute of a zone) which is relevant for cluster routing.This leads to confusing code where
GetZone()
of the same object behaves differently depending on its static type: https://github.com/Icinga/icinga2/blob/7f5225ecaa2ddf6a483f1c1f36e83b251ca1276f/lib/icingadb/icingadb-objects.cpp#L1094-L1098Also, when discussing it internally, it was quite hard to refer to both of these zone relationships so we should come up with better and more distinctive naming.