From df36f1ce7e333ff79ab61cb93cf654eb511310fa Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 1 Dec 2026 10:34:32 +0000 Subject: [PATCH] refactor(cloudflare): read the community.general pin from requirements, drop the plugin copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The community.general version now lives only in requirements/requirements.galaxy.yml and requirements/requirements.git.yml, which utils/update/galaxy.py rewrites together. REVIEWED_COMMUNITY_GENERAL in plugins/action/cloudflare_records_converged.py had no runtime use and existed only for a test, so it goes. The module-defaults test compares the resolved collection with the galaxy pin via declared_pins(); the pin-equals-plugin-copy test is removed. A repo-wide lint for test-only production constants follows in its own PR. Related: https://github.com/infinito-nexus/core/pull/3210 🎯 Fix: 92 % 💥 Break: 2 % 💸 Tokens: 100 % ⏱️ Velocity: 100 % 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- plugins/action/cloudflare_records_converged.py | 1 - .../action/test_cloudflare_records_converged.py | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/action/cloudflare_records_converged.py b/plugins/action/cloudflare_records_converged.py index 4b36de0ac5..d49dde290b 100644 --- a/plugins/action/cloudflare_records_converged.py +++ b/plugins/action/cloudflare_records_converged.py @@ -14,7 +14,6 @@ from ansible.module_utils.urls import open_url from ansible.plugins.action import ActionBase ZONES = "https://api.cloudflare.com/client/v4/zones" -REVIEWED_COMMUNITY_GENERAL = "14.1.0" PAGE_SIZE = 5000 ARGUMENTS = frozenset({"api_token", "records", "timeout"}) JUDGED_TYPES = ("A", "AAAA", "CNAME", "MX", "TXT", "SRV") diff --git a/tests/unit/python/plugins/action/test_cloudflare_records_converged.py b/tests/unit/python/plugins/action/test_cloudflare_records_converged.py index 32cbc661fa..15e278a3f1 100644 --- a/tests/unit/python/plugins/action/test_cloudflare_records_converged.py +++ b/tests/unit/python/plugins/action/test_cloudflare_records_converged.py @@ -703,23 +703,19 @@ class TestModuleDefaultsMatchThePlugin(unittest.TestCase): ): collection = _resolved_community_general() manifest = json.loads(read_text(str(collection / "MANIFEST.json"))) + pins = dict( + declared_pins(PROJECT_ROOT / "requirements" / "requirements.galaxy.yml") + ) defaults = _argument_spec_defaults( collection / "plugins" / "modules" / "cloudflare_dns.py" ) self.assertEqual( - manifest["collection_info"]["version"], plugin.REVIEWED_COMMUNITY_GENERAL + manifest["collection_info"]["version"], pins["community.general"] ) self.assertEqual(defaults["priority"], plugin.MODULE_PRIORITY) self.assertEqual(defaults["proxied"], plugin.MODULE_PROXIED) - def test_a_new_community_general_pin_forces_a_review_of_the_plugin(self): - pins = dict( - declared_pins(PROJECT_ROOT / "requirements" / "requirements.galaxy.yml") - ) - - self.assertEqual(pins["community.general"], plugin.REVIEWED_COMMUNITY_GENERAL) - if __name__ == "__main__": unittest.main()