Skip to content

Conversation

@eb4x
Copy link
Collaborator

@eb4x eb4x commented Apr 3, 2025

SUMMARY

A bit of spring-cleaning. Dropping out Zabbix 6.4 from testing and (most?) of our code. (Strategy jobs for molecule exceed the maximum of 256 configurations, so the test wouldn't run on my fork)

At long last, we should be able to deploy these roles with inject_facts_as_vars set to false. The short version is that the addition of all these extra facts slow down deployments, especially at scale. Some more details are available at ansible/ansible#73654

Simplifying and removing a ton of tasks from molecule/*/prepare.yml that just weren't needed, and cleaning up the javagateway role a bit.

Updating pinned collections for CI

Fixes #1469

ISSUE TYPE
  • Refactor Pull Request
COMPONENT NAME

All the roles

ADDITIONAL INFORMATION

We could possibly be even more aggressive in removal of tasks from the prepare.yml files.

eb4x added 23 commits April 3, 2025 13:51
Strategy jobs for molecule now exceed the maximum of 256
configurations. So let's remove testing for 6.4 which is no longer
supported by Zabbix.
I'm not sure when this was originally introduced, and what it's
for. It seems to want to remove the proxy setting from repo files,
which is counter-productive to those wanting to use a proxy.
This type of set_fact usage is cleaner when supplied as defaults
net-tools went out of style atleast two decades ago, sometime 2001.
Then someone kindly pointed that out again in 2009 [1]. You should
not be using this package, nor these tools.

The installation of these packages feel like some old relic for
someone wanting some debug tools inside the container, and not
really relevant for zabbix-server itself.

[1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
net-tools went out of style atleast two decades ago, sometime 2001.
Then someone kindly pointed that out again in 2009 [1]. You should
not be using this package, nor these tools.

The installation of these packages feel like some old relic for
someone wanting some debug tools inside the container, and not
really relevant for zabbix-proxy itself.

[1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
net-tools went out of style atleast two decades ago, sometime 2001.
Then someone kindly pointed that out again in 2009 [1]. You should
not be using this package, nor these tools.

The installation of these packages feel like some old relic for
someone wanting some debug tools inside the container, and not
really relevant for zabbix-web itself.

[1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
I think we should drop this task completely (we're not using this
for zabbix_web), but for now just clarifying what it's for feels
like a small victory.

Dropping the apt-get update, as we can pass update_cache: true to
any package installation task and therefore no need to do this.

There should not really be any services installed or required to run
during our setup of the zabbix_repo, so just remove the task.
They're not all testing the server role. Removing this copy-pasta.
Simplifying timescale and sqlite3 import, by reusing *_database_file_dir.

Moving '_' prefixed internal vars to vars/ to declutter defaults.

And eliminating the trailing slash from the variable makes the code
read easier with a natural / separating the variable and the path
continuation.
I tried to go back in the logs to find a reason for this. We don't
do this for any other services, and from a security standpoint this
is not the way to do it. If you can't afford to have the service
running unconfigured for 2 minutes before the playbook configures
it and restarts the service, you can't afford to have it start up
at all. In that case we should be masking the service, or using
policy-rc.d or some other solution to prevent it from starting up
after install.
We've done this for zabbix_{server,proxy} already, so a single task
for the installation all distributions.

Rule of thumb, if you're doing less than 5 tasks (and not looping
an include task), it probably doesn't deserve its own task file, so
the remaining os_family specific tasks can be merged in to main.yml

I'm a bit unsure about installing openjdk for Suse, why aren't we
installing openjdk for other distros?
This (probably) has to do with where the sql-scripts were installed
under zabbix 5.0.
We don't need this apt-get update, so lets use the file module to
create the missing directory.
net-tools went out of style atleast two decades ago, sometime 2001.
Then someone kindly pointed that out again in 2009 [1]. You should
not be using this package, nor these tools.

The installation of these packages feel like some old relic for
someone wanting some debug tools inside the container, and not
really relevant for zabbix-java-gateway itself.

[1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
Probably time to update these, see what shakes out.
@eb4x eb4x force-pushed the do_not_inject_facts_as_vars branch from 5b60760 to 61357d0 Compare April 3, 2025 11:52
@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.96%. Comparing base (bd86d7d) to head (c3b3a8e).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1497      +/-   ##
==========================================
- Coverage   79.05%   78.96%   -0.09%     
==========================================
  Files          47       47              
  Lines        5958     5958              
  Branches     1539     1539              
==========================================
- Hits         4710     4705       -5     
- Misses        768      772       +4     
- Partials      480      481       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eb4x eb4x marked this pull request as ready for review April 3, 2025 13:33
@eb4x eb4x requested review from BGmot and pyrodie18 April 3, 2025 20:31
@eb4x
Copy link
Collaborator Author

eb4x commented Apr 4, 2025

I'm merging this despite the failed plugin-integration tests for 7.0. I don't believe any of the changes to .github/workflows/plugins-integration.yml are the cause of it failing.

@eb4x eb4x merged commit 64937bb into ansible-collections:main Apr 4, 2025
505 of 521 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop 6.4 support?

2 participants