-
Notifications
You must be signed in to change notification settings - Fork 577
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
MacroProcessor::ResolveMacro(): treat quasi-CV-object IcingaApplication as real CV-object #9779
MacroProcessor::ResolveMacro(): treat quasi-CV-object IcingaApplication as real CV-object #9779
Conversation
Could |
If you ask this way: no. IcingaApplication couldn’t "just" inherit from CustomVarObject. A such inheritance could bring far more undesirable surprises. You had to insert CustomVarObject -> ConfigObject into the existing IcingaApplication -> Application -> ConfigObject tree. Application -> CustomVarObject? Would require the latter being in libbase. Forget it. Virtual inheritance? This would open a construction area on its own. CustomVarObject as mixin like ConfigType? You already dislike such existing stuff. Inconsistencies or not – nobody complained. At best this is a quality issue. |
I didn't consider that indirection in the inheritance of So in summary, the ability to provide recursive macros is limited to within |
The only other places that seem to take special care of Apart from that, it changes which hard-coded macros from |
Which change exactly? Also, does the latter imply that the remaining inconsistencies, if any, are at best pure code quality issues? |
Doing it this way instead of trying to make
That means that I haven't looked at the IDO code, I just found that it references |
e2588b2
to
0464b7f
Compare
…on as real CV-object As MacroProcessor checked just for CustomVarObject base class, but IcingaApplication provided the vars attribute by itself, it had to also resolve CV macros by itself. That logic diverged from MacroProcessor so that macros inside IcingaApplication CVs weren't resolved. Until now.
0464b7f
to
a9c80ff
Compare
As MacroProcessor checked just for CustomVarObject base class, but IcingaApplication provided the vars attribute by itself, it had to also resolve CV macros by itself. That logic diverged from MacroProcessor so that macros inside IcingaApplication CVs weren't resolved. Until now.
ref/IP/46031
Test protocol
Config
Logs
[2023-05-31 11:57:08 +0200] warning/PluginCheckTask: Check command for object 'Alexanders-MacBook-Pro-2.local' (PID: 87725, arguments: 'python3' '-c' 'import sys; print(sys.argv); exit(128)' 'myecho_1' '42$') terminated with exit code 128, output: ['-c', 'myecho_1', '42$']
Conclusion
$$ now becomes $ as expected. (Before: $$ -> $$)