Hello Foreman developers and plugin maintainers,
As part of the Foreman 3.18 branching process, we need to remove accumulated Foreman deprecations that have reached their deadline from the develop branch.
I’ve analyzed the Foreman core codebase and found several deprecations that should be removed for Foreman 3.19.
Core Foreman Deprecations to Remove
Long Overdue (versions 3.3-3.4):
db/seeds.rb:10- Removeformat_errorsdeprecation (deadline 3.4)app/models/setting.rb:203- Remove Setting subclassing deprecation (deadline 3.4)app/services/proxy_api/resource.rb:70- Remove ProxyApi headers deprecation (deadline 3.3)
Overdue from 3.12:
app/services/owner_classifier.rb:16- Removeuser_or_usergroupmethod deprecationapp/helpers/reactjs_helper.rb:24- Removewebpacked_plugins_css_formethod deprecationapp/helpers/reactjs_helper.rb:71- Removecss_tags_formethod deprecationapp/helpers/layout_helper.rb:120- Removewebpack_asset_pathsdeprecation (JS)app/helpers/layout_helper.rb:126- Removewebpack_asset_pathsdeprecation (CSS)
Expired in 3.18:
app/controllers/concerns/foreman/controller/parameters/auth_source_ldap.rb:36- Removeuse_netgroupsparameter deprecation
Plugin Deprecations - Plugin Maintainers
While reviewing the core deprecations, I also took a look at the foreman-tasks plugin and found some older deprecations. Plugin maintainers should check their own plugins for similar cleanup opportunities.
foreman-tasks Plugin (versions 2.4-2.5):
app/lib/actions/helpers/lock.rb:18- Old locking mechanism deprecation (deadline 2.4)app/lib/actions/middleware/keep_current_user.rb:22- Current user setting deprecation (deadline 2.5)app/controllers/foreman_tasks/api/tasks_controller.rb:183-184- Sort parameter deprecation
For Other Plugin Maintainers:
Please search your plugins for deprecations that should be cleaned up:
# Search for Foreman deprecation warnings with version deadlines < 3.19
grep -rE "deprecation_warning.*[\"'][0-3]\.([0-9]|1[0-8])[\"']" /path/to/your/plugin/ --include="*.rb"
As you can see from the foreman-tasks example, some deprecations can be quite old. I’d encourage plugin maintainers to take a moment and search for deprecations in plugins they maintain.
How to Help
For Core Contributors:
- Remove the deprecated code entirely and update any callers to use the new methods
- Check plugins you maintain for usage of these deprecated core methods
- Run tests to ensure removal doesn’t break functionality
- Create PRs targeting the develop branch
For Plugin Maintainers:
- Search your plugins for the deprecation patterns above
- Remove expired deprecations (anything with deadline < 3.19)
- Update your plugins if they use any of the deprecated core methods being removed
- Test compatibility with the latest core develop branch
- Create PRs for your plugin repositories
When Removing Deprecations:
- Remove both the deprecated method/code AND the deprecation warning
- Update any internal callers to use the new approach
- Add tests if needed to ensure the new code path works correctly
- Update documentation if the deprecated functionality was documented
Timeline
According to the Foreman 3.19 schedule, we are branching on May 12, 2026. These deprecations should be removed before the branching date to ensure they’re cleaned up in 3.19.
Thank you for your help!