8000 dnf module: undocumented return values diverging from other modules · Issue #70003 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
dnf module: undocumented return values diverging from other modules #70003
Open
@ssbarnea

Description

@ssbarnea
SUMMARY

Current implementation of dnf module diverges from the one of other similar packaging modules by failing to rely solely on the msg return value.

Module also returns critical information inside undocumented failures: [] value, something for which we were unable to identify any other module.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

dnf

ANSIBLE VERSION
2.10 - anu=y
STEPS TO REPRODUCE
- dnf:
    name: not-existing-package
  register: result
EXPECTED RESULTS

We do expect to include all needed information inside standardizes keys, like msg, stderr and stdout.

ACTUAL RESULTS
{
"msg": "Failed to install some of the specified packages",
"failures": [
    "No package python-docker-py available."
]
}

Especially because the the failures was always undocumented, changing the module to assure it includes the full list of errors inside msg should not be seen as a problem.

Example below displays the diverging behavior between apt and dnf modules, which create weird results when used by package:

fatal: [ubuntu]: FAILED! => changed=false
  msg: No package matching 'not-existing-foo' is available
...ignoring
fatal: [centos]: FAILED! => changed=false
  failures:
  - No package not-existing-foo available.
  - No package not-existing-bar available.
  msg: Failed to install some of the specified packages
  rc: 1
  results: []

If failures is there by greater design, it should be documented and also mentioned in documentation for module developers, so others can make use of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority 3 - Approved, No Time Limitationaffects_2.11bugThis issue/PR relates to a bug.docsThis issue/PR relates to or includes documentation.moduleThis issue/PR relates to a module.packagingPackaging categorysupport:coreThis issue/PR relates to code supported by the Ansible Engineering Team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0