Hide Forgot
freeipa-healthcheck fails to build with Python 3.10.0a4. tests/test_ipa_dns.py FEFEFEFEFEFEFEFEFE [ 33%] For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01875840-freeipa-healthcheck/ For all our attempts to build freeipa-healthcheck with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/freeipa-healthcheck/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Many errors are: def no_exceptions(results): """Given Results ensure that an except was not raised""" > for result in results.results: E AttributeError: 'NoneType' object has no attribute 'results' And: E AttributeError: <module 'ipaserver.dns_data_management' from '/usr/lib/python3.10/site-packages/ipaserver/dns_data_management.py'> does not have the attribute 'resolve_rrsets' One is: E assert "Result.__ini... and 'result'" == "__init__() m... and 'result'" E - __init__() missing 2 required positional arguments: 'plugin' and 'result' E + Result.__init__() missing 2 required positional arguments: 'plugin' and 'result' E ? +++++++
Tests are failing because https://pagure.io/freeipa/issue/8529 removed import of resolve_rrsets ________________ TestDNSSystemRecords.test_dnsrecords_bad_realm ________________ /usr/lib64/python3.10/unittest/mock.py:1348: in patched with self.decoration_helper(patched, /usr/lib64/python3.10/contextlib.py:133: in __enter__ return next(self.gen) /usr/lib64/python3.10/unittest/mock.py:1330: in decoration_helper arg = exit_stack.enter_context(patching) /usr/lib64/python3.10/contextlib.py:478: in enter_context result = _cm_type.__enter__(cm) /usr/lib64/python3.10/unittest/mock.py:1419: in __enter__ original, local = self.get_original() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <unittest.mock._patch object at 0x7f47ce41ecd0> def get_original(self): target = self.getter() name = self.attribute original = DEFAULT local = False try: original = target.__dict__[name] except (AttributeError, KeyError): original = getattr(target, name, DEFAULT) else: local = True if name in _builtins and isinstance(target, ModuleType): self.create = True if not self.create and original is DEFAULT: > raise AttributeError( "%s does not have the attribute %r" % (target, name) ) E AttributeError: <module 'ipaserver.dns_data_management' from '/usr/lib/python3.10/site-packages/ipaserver/dns_data_management.py'> does not have the attribute 'resolve_rrsets' /usr/lib64/python3.10/unittest/mock.py:1392: AttributeError
The resolve_rrsets issue should already be handled by https://github.com/freeipa/freeipa-healthcheck/commit/30d97eff4b932001a1c1771cc64743752115ea6f which is in freeipa-healthcheck-0.7 in rawhide. I'll take a look.
I've reproduced additional failures in rawhide using python 3.9 that I need to get through first. It looks related to data new validations added to python3-dns-2.1.0-1. The test is doing the absolute minimum to fake a DNS response and that is no longer sufficient for python3-dns.
The 0.7 tarball doesn't match the upstream 0.7 tag by two commits. The resolve_rrsets change is one of them :/ I'm not sure how this happened or what I want to do about it.
I'm going to do another upstream release to fix the missing commit issue in addition to PR https://github.com/freeipa/freeipa-healthcheck/pull/177 which will fix test execution with python3-dns-2.1.0.
Hello, thank you for the fix. Sadly, there is still one more test failing. For complete log see: https://download.copr.fedorainfracloud.org/results/@python/python3.10/fedora-rawhide-x86_64/01879241-freeipa-healthcheck/builder-live.log.gz =================================== FAILURES =================================== _________________________________ test_Result __________________________________ def test_Result(): """ Test the `ipahealthcheck.plugin.Result` class """ registry = Registry() p = Plugin(registry) # Standard case of passing plugin to Result r = Result(p, constants.SUCCESS) kw = dict(key='value') r = Result(p, constants.SUCCESS, **kw) e = raises(TypeError, Result) > assert str(e) == "__init__() missing 2 required positional arguments: " \ "'plugin' and 'result'" E assert "Result.__ini... and 'result'" == "__init__() m... and 'result'" E - __init__() missing 2 required positional arguments: 'plugin' and 'result' E + Result.__init__() missing 2 required positional arguments: 'plugin' and 'result' E ? +++++++ tests/test_results.py:25: AssertionError =========================== short test summary info ============================ FAILED tests/test_results.py::test_Result - assert "Result.__ini... and 'resu... ======================== 1 failed, 120 passed in 1.93s =========================
Ok I see the problem. Looks like python 3.10 is adding the class name to the exception. I have a fix, do you need a build or is pushing the patch to distgit sufficient?
Pushing the patch to distgit is sufficient. If you open a PR, the copr repo will attempt to build it in https://copr.fedorainfracloud.org/coprs/g/python/python3.10/builds/?dirname=python3.10:pr:<pr_number>
I'm not sure how to do that against copr. I created a PR against the healthcheck dist-git, maybe you can cherry-pick that? https://src.fedoraproject.org/rpms/freeipa-healthcheck/pull-request/3
That's it, your build is in https://copr.fedorainfracloud.org/coprs/g/python/python3.10/builds/?dirname=python3.10:pr:3 and it is a success. When you merge the PR, it will be built in the copr's main directory.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.