question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

anyconfig breaks molecule on centos-8

See original GitHub issue

Issue Type

  • Bug report

Molecule and Ansible details

Initiall seen at https://zuul.opendev.org/t/openstack/build/236553c6a6d84d0788518f449f89bb18/log/job-output.txt

File "/home/zuul/test-python/lib/python3.6/site-packages/anyconfig/backends.py", line 44, in <module>
import anyconfig.backend.configobj

I am not yet sure which version of anyconfig caused this but because this is the 2nd breaking bug in two weeks and because anyconfig is solely used in a single place in order to us its dictionary-merge strategy, I wonder if it would not be better to drop it as a dependency.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ssbarneacommented, Nov 14, 2019

This issue seems very similar to Ansible hash_behaviour feature so I would be inclined to look at how Ansible does it and to reuse its implementation if possible. We can even document that we are using Ansible logic and avoid extra maintenance on the subject.

1reaction
tadeborocommented, Nov 14, 2019

I started adding a bit more tests for the merge_dicts function in order to get a clear idea on how anyconfig merge worked and I already found something interesting:

@pytest.mark.parametrize('a,b,x', [
    (dict(key={}), dict(key=2), dict(key=2)),
    (dict(key=1), dict(key={}), dict(key={})),
])
def test_merge_dicts(a, b, x):
    assert x == util.merge_dicts(a, b)

The merge fails in the first scenario (TypeError, int is not iterable) but goes through in the second one. And merge being asymmetric does not feel right. Any suggestions on how to proceed here? Should we always fail if only one of the values is dict? Should we simply replace the value in this case? Or should we keep the (in my honest opinion useless) existing behavior?

Read more comments on GitHub >

github_iconTop Results From Across the Web

anyconfig breaks molecule on centos-8 · Issue #2435 - GitHub
The merge fails in the first scenario ( TypeError , int is not iterable) but goes through in the second one. And merge...
Read more >
.pylintrc · 08526262c818477ec945d1b21486cc210cc33550 · ICS ...
Init add of molecule v2 work Initial work of a v2 based Molecule. This version of Molecule has a slightly different config, uses...
Read more >
conda-forge - :: Anaconda.org
alsa-lib, 1.2.8, LGPL-2.1-or-later, X, Advanced Linux Sound Architecture ... Blendase is a Python package for drawing and rendering atoms, molecules.
Read more >
Fedora 35 compose report: 20210925.n.1 changes - devel
... KiB Package: rust-predicates1-1.0.8-1.fc35 Summary: Implementation of ... as it breaks tests Package: buildah-1.23.0-1.fc35 Old package: ...
Read more >
See raw diff - Hugging Face
Structure of HIP CERT parameter [RFC 7401]: - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found