Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python_requirements_info: don't overwrite results in 'mismatched' dict key #4078

Merged

Conversation

wbh1
Copy link
Contributor

@wbh1 wbh1 commented Jan 24, 2022

SUMMARY

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage and how the valid return value is handled.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

python_requirements_info

ADDITIONAL INFORMATION

With dependencies: ['salt==3003.3', 'jinja2<1']:

Before:

salt-master-us-east | SUCCESS => {
    "mismatched": {
        "desired": "jinja2>3",
        "installed": "2.10"
    },
}

After:

salt-master-us-east | SUCCESS => {
    "mismatched": {
        "jinja2": {
            "desired": "jinja2>3",
            "installed": "2.10"
        },
        "salt": {
            "desired": "salt==3003.3",
            "installed": "3003"
        }
    },
}

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review system labels Jan 24, 2022
@felixfontein felixfontein added backport-3 check-before-release PR will be looked at again shortly before release and merged if possible. labels Jan 24, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Could you please add a changelog fragment? Thanks!

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.
@wbh1 wbh1 force-pushed the fix/python_requirements_info branch from 8acad96 to eedeaab Compare January 25, 2022 16:01
@wbh1
Copy link
Contributor Author

wbh1 commented Jan 25, 2022

@felixfontein Done. Thank you!

@ansibullbot ansibullbot removed the small_patch Hopefully easy to review label Jan 25, 2022
Co-authored-by: Felix Fontein <felix@fontein.de>
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! If nobody complains, I'll merge this by the end of this week.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jan 29, 2022
@felixfontein felixfontein merged commit 526369a into ansible-collections:main Jan 29, 2022
@patchback
Copy link

patchback bot commented Jan 29, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/526369a2439a1306d6635e98bfe25e18c63db07d/pr-4078

Backported as #4110

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@wbh1 thanks for your contribution!

patchback bot pushed a commit that referenced this pull request Jan 29, 2022
…t key (#4078)

* bugfix: don't overwrite results in 'mismatched'

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.

* Update changelogs/fragments/4078-python_requirements_info.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 526369a)
@patchback
Copy link

patchback bot commented Jan 29, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/526369a2439a1306d6635e98bfe25e18c63db07d/pr-4078

Backported as #4111

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 29, 2022
…t key (#4078)

* bugfix: don't overwrite results in 'mismatched'

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.

* Update changelogs/fragments/4078-python_requirements_info.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 526369a)
felixfontein pushed a commit that referenced this pull request Jan 29, 2022
…t key (#4078) (#4110)

* bugfix: don't overwrite results in 'mismatched'

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.

* Update changelogs/fragments/4078-python_requirements_info.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 526369a)

Co-authored-by: Will Hegedus <will@wbhegedus.me>
felixfontein pushed a commit that referenced this pull request Jan 29, 2022
…t key (#4078) (#4111)

* bugfix: don't overwrite results in 'mismatched'

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.

* Update changelogs/fragments/4078-python_requirements_info.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 526369a)

Co-authored-by: Will Hegedus <will@wbhegedus.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants