Skip to content

Conversation

yhabteab
Copy link
Member

@yhabteab yhabteab commented May 26, 2025

Contains the following two commits:

  • Drop Checkable#process_check_result() DSL function: Not sure why it's introduced in the first place, maybe for debugging purposes at the early stage of Icinga 2 dev but I failed to see an actual useful use case for it that's worth its maintenance burden. So, this commit dropped it entirely from the DSL language.
  • Drop System#track_parents DSL function: No external user needs to manipulate the actual object dependency graphs. This was maybe introduced for debugging purposes at that time but if someone messes with this in prod - good luck with that. Oh, apart from that it's broken :( and doesn't track parents as its name implies but children.

fixes #10272

@yhabteab yhabteab added this to the 2.15.0 milestone May 26, 2025
@yhabteab yhabteab added area/configuration DSL, parser, compiler, error handling core/quality Improve code, libraries, algorithms, inline docs labels May 26, 2025
@cla-bot cla-bot bot added the cla/signed label May 26, 2025
@yhabteab yhabteab changed the title Drop superfluous (broken) DSL function Drop superfluous (broken) DSL functions May 26, 2025
@yhabteab yhabteab force-pushed the remove-superfluous-dsl-functions branch from ae06649 to e685973 Compare June 2, 2025 13:42
@yhabteab yhabteab requested a review from jschmidt-icinga June 2, 2025 14:23
yhabteab added 2 commits June 3, 2025 17:09
Not sure why it's introduced in the first place, maybe for debugging
purposes at the early stage of Icinga 2 dev but I failed to see an
actual useful use case for it that's worth its maintenance burden. So,
this commit dropped it entirely from the DSL language.
No external user needs to manipulate the actual object dependency
graphs. This was maybe introduced for debugging purposes at that time
but if someone messes with this in prod - good luck with that. Oh, apart
from that it's broken :( and doesn't track parents as its implies but
children.
Copy link
Contributor

@julianbrost julianbrost left a comment

Choose a reason for hiding this comment

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

Drop Checkable#process_check_result() DSL function: Not sure why it's introduced in the first place

It's not documented, searching the internet also finds no mention of it that would suggest plausible use of that function.

Back when it was added, it was mentioned in the changelog though:

* [#4443](https://github.com/icinga/icinga2/issues/4443): Implement process\_check\_result script method for the Checkable class

However, the referenced issue #4443 doesn't provide any useful context either and looks like it was created just so that there was an issue ID to reference, it was open for less than a minute after all:

Created on 2016-08-08 12:14:39 +00:00
closed on 2016-08-08 12:15:06 +00:00

Apart from that, I fail to see a plausible use-case for this function. The usual way to run DSL function as a check command is to use check_command = "dummy" with the corresponding input variables set to functions.

Drop System#track_parents DSL function: No external user needs to manipulate the actual object dependency graphs.

That function does not manipulate anything, it just allows inspecting some internals that happen to contradict the function name. Similar like the other function, it wasn't documented and searching the internet for it yields nothing relevant.

@julianbrost julianbrost merged commit dcd9a2d into master Jun 10, 2025
25 of 27 checks passed
@julianbrost julianbrost deleted the remove-superfluous-dsl-functions branch June 10, 2025 14:33
@yhabteab yhabteab removed the request for review from jschmidt-icinga June 10, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling cla/signed core/quality Improve code, libraries, algorithms, inline docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop DSL function System.track_parents()
2 participants