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

rhsm_release: improve the execution of subscription-manager #6669

Merged

Conversation

ptoscano
Copy link
Contributor

SUMMARY
  • pass the arguments to run_command() directly as list, rather than joining the arguments to string, which run_command() will need to split again
  • disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called, factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.

ISSUE TYPE
  • Refactoring Pull Request
COMPONENT NAME

rhsm_release

@ansibullbot
Copy link
Collaborator

cc @cnsnyder @seandst
click here for bot help

@ansibullbot ansibullbot added module module plugins plugin (any type) tests tests unit tests/unit labels Jun 10, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-7 labels Jun 10, 2023
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! Please add a changelog fragment :)

- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called,
factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.
@ptoscano ptoscano force-pushed the rhsm_release-improve-subman branch from 4e474aa to 8b1fad9 Compare June 11, 2023 06:14
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 11, 2023
@felixfontein
Copy link
Collaborator

@ptoscano thanks!

@felixfontein felixfontein merged commit 74ffb29 into ansible-collections:main Jun 11, 2023
@patchback
Copy link

patchback bot commented Jun 11, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/74ffb29573491798b889a53d6cc57444ad37f630/pr-6669

Backported as #6674

🤖 @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 Jun 11, 2023
- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called,
factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.

(cherry picked from commit 74ffb29)
@ptoscano ptoscano deleted the rhsm_release-improve-subman branch June 11, 2023 08:59
felixfontein pushed a commit that referenced this pull request Jun 11, 2023
…ution of subscription-manager (#6674)

rhsm_release: improve the execution of subscription-manager (#6669)

- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called,
factorizing the kwargs for run_command() so there is less repetition.

There should be no behaviour changes.

(cherry picked from commit 74ffb29)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module module plugins plugin (any type) tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants