Skip to content

Schedule deprecated features for removal in v2.18#10734

Merged
julianbrost merged 3 commits intomasterfrom
deprecate-everything-we-dont-like
Mar 31, 2026
Merged

Schedule deprecated features for removal in v2.18#10734
julianbrost merged 3 commits intomasterfrom
deprecate-everything-we-dont-like

Conversation

@jschmidt-icinga
Copy link
Copy Markdown
Contributor

@jschmidt-icinga jschmidt-icinga commented Feb 25, 2026

Description

This updates the existing deprecation (both in documentation and runtime warnings) of the following features to mention that they will be removed in v2.18:

  • IdoMySqlConnection
  • IdoPgsqlConnection
  • CompatLogger
  • ExternalCommandListener
  • LivestatusListener
  • Windows check-plugins (check_*.exe) and CheckCommands

It also adds the same deprecation notices for

Closes #10730 and #10725.

@cla-bot cla-bot Bot added the cla/signed label Feb 25, 2026
@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from 35f78b9 to bdea13d Compare February 25, 2026 10:46
@jschmidt-icinga jschmidt-icinga marked this pull request as ready for review February 25, 2026 10:51
@julianbrost julianbrost added this to the 2.16.0 milestone Feb 25, 2026
@julianbrost
Copy link
Copy Markdown
Member

Currently for the namespace the "code location" (i.e., the whole namespace definition and its contents) are printed in the log, which might be a bit too verbose. Should I keep it this way or tone down the warning to only include the file + position in the warning.

That sounds like it would be disproportionately annoying. Would it be possible to use just the namespace name instead of the whole thing to print the location? So that for namespace foo { /* many lines */ }, it would just highlight foo? If not, I'd just go for file and position.

Should the milestones URL still be there, now that a version is set? I'm asking because I don't get why it was there in the first place. What information was the user supposed to find there?

That's a good question. I guess it was more of a placeholder because no version number was fixed. Theoretically, you could go there and check if any upcoming milestone contains hints of a removal. Even if someone did that in the past, as these warnings were logged for years now, I don't think anyone is still doing it regularly. With the version number in there, I don't see any reason to keep the link.

@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch 2 times, most recently from 808f3fc to 798814d Compare February 25, 2026 13:47
@jschmidt-icinga
Copy link
Copy Markdown
Contributor Author

  • Removed the reference to the github milestones. Version 2.18 should be clear enough.
  • Moved the warning for the user-defined namespaces from NamespaceExpression to SetExpression (where the namespace content are assigned to the field in the global namespace), because there, the name of the namespace is known (so we don't have to print out the entire namespace, just the name, file and position). This should be fine since through the parser, all namespaces are assigned to global scope and pass through SetExpression.

@yhabteab
Copy link
Copy Markdown
Member

  • Moved the warning for the user-defined namespaces from NamespaceExpression to SetExpression (where the namespace content are assigned to the field in the global namespace), because there, the name of the namespace is known (so we don't have to print out the entire namespace, just the name, file and position). This should be fine since through the parser, all namespaces are assigned to global scope and pass through SetExpression.

Hm, now it looks like this and looks a bit odd to me:

[2026-02-25 16:19:39 +0100] warning/config: Warning: User-defined namespaces are deprecated and will be removed in v2.18:
namespace 'utils' in icinga2.conf: 21:1-57:1

I would have done this exactly at the previous location when evaluating the namespace expression, and then pass a copy of m_DebufInfo to the ShowCodeLocation function with adjusted m_DebugInfo.Last{Column,Line} instead. That way, it would have printed/highlighted only the starting point of the namespace declaration along with the squiggly lines under it.

Also, I would remove the extra Warning: from the actual log message as it's obvious based on the log facility that this is a warning. Furthermore, is it just me or all the sentences ending with in v2.18. look as if they are missing something at the end? I would have expected them to end with v2.18.0 or something like that, but currently all the sentences look incomplete to me.

@julianbrost
Copy link
Copy Markdown
Member

Hm, now it looks like this and looks a bit odd to me:

[2026-02-25 16:19:39 +0100] warning/config: Warning: User-defined namespaces are deprecated and will be removed in v2.18:
namespace 'utils' in icinga2.conf: 21:1-57:1

Is that the full output right now, i.e. nothing following showing the contents of icinga2.conf: 21:1-57:1?

@yhabteab
Copy link
Copy Markdown
Member

Is that the full output right now, i.e. nothing following showing the contents of icinga2.conf: 21:1-57:1?

Nope, that's the full output of this.

@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch 2 times, most recently from 7c85041 to 2bde698 Compare February 26, 2026 08:38
@jschmidt-icinga
Copy link
Copy Markdown
Contributor Author

jschmidt-icinga commented Feb 26, 2026

As suggested by @yhabteab I moved the namespace warning back into NamespaceExpression and adjusted the DebugInfo struct to only show a single line:

[2026-02-26 08:26:43 +0000] warning/config: User-defined namespaces are deprecated and will be removed in v2.18:
Location: in /data/etc/icinga2/zones.d/master/test.conf: 2:1-2:0
/data/etc/icinga2/zones.d/master/test.conf(2): namespace math_utils {
                                               ^^^^^^^^^^^^^^^^^^^^^^

However, to get the "squiggly line" I had to extend ShowCodeLocation(), because otherwise there would have been no way to squiggle until the end of line (we don't know what column that is at). Now a di.LastColumn of zero or less means a column relative to the end of the line. Zero is safe since for the purposes of this function, columns start at 1. Btw.: This was the original reason why I thought I had to move it and format the code location manually.

I've kept the version number at v2.18 for now (indicating the major release, not a specific version number), for which there is precedence in other places in the documentation. If consensus is that we want to write v2.18.0 exactly, that's a quick change.

Copy link
Copy Markdown
Member

@yhabteab yhabteab left a comment

Choose a reason for hiding this comment

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

I've kept the version number at v2.18 for now (indicating the major release, not a specific version number), for which there is precedence in other places in the documentation. If consensus is that we want to write v2.18.0 exactly, that's a quick change.

I can't explain why, but for me this sentence looks like as if some minor version is missing at the end, i.e., the period at the end is just confusing IMHO.

"This feature is DEPRECATED and will be removed in v2.18."

Comment thread lib/base/debuginfo.cpp
Comment thread doc/09-object-types.md
Comment thread doc/14-features.md
Comment thread doc/17-language-reference.md Outdated
Comment thread lib/db_ido_mysql/idomysqlconnection.cpp Outdated
@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from 2bde698 to 676d473 Compare March 3, 2026 10:02
Comment thread lib/config/expression.cpp
@Al2Klimov Al2Klimov dismissed their stale review March 17, 2026 09:53

Justification has been provided: #10725 (comment)

@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from 676d473 to 142f0a1 Compare March 24, 2026 15:27
@jschmidt-icinga
Copy link
Copy Markdown
Contributor Author

  • Add logging of a warning and a deprecation notice in the documentation for the Windows check_*.exe plugins.

Comment thread lib/icinga/checkable.cpp Outdated
Comment thread lib/icinga/checkcommand.ti Outdated
Comment thread itl/command-plugins-windows.conf Outdated
@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from 142f0a1 to a1aafee Compare March 26, 2026 08:17
Copy link
Copy Markdown
Member

@yhabteab yhabteab left a comment

Choose a reason for hiding this comment

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

All the other warnings are logged from within the OnAllConfigLoaded method but the newly added one about the windows checkcommands is logged in OnConfigLoaded. I would move it down to the the OnAllConfigLoaded method as well for consistency, otherwise looks fine to me now.

@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from a1aafee to cc8ce6f Compare March 27, 2026 07:49
yhabteab
yhabteab previously approved these changes Mar 27, 2026
Comment thread lib/icinga/checkable.cpp
Comment thread lib/icinga/checkable.cpp
@yhabteab yhabteab linked an issue Mar 27, 2026 that may be closed by this pull request
@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch 3 times, most recently from 613ba59 to 32150e6 Compare March 27, 2026 12:35
@jschmidt-icinga jschmidt-icinga force-pushed the deprecate-everything-we-dont-like branch from 32150e6 to 1e022db Compare March 27, 2026 13:25
@julianbrost julianbrost merged commit 9d361e1 into master Mar 31, 2026
69 of 74 checks passed
@julianbrost julianbrost deleted the deprecate-everything-we-dont-like branch March 31, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add deprecation warnings with removal timeline Proposal: deprecate custom DSL namespace

4 participants