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

Add support for name, pkgs and diff_attr parameters to zypperpkg.upgrade()/yumpkg.upgrade() #62033

Merged
merged 4 commits into from
Oct 6, 2022

Conversation

agraul
Copy link
Contributor

@agraul agraul commented May 6, 2022

What does this PR do?

Add diff_attr to yumpkg.upgrade() and add it, together with name and pkgs, to zypperpkg.upgrade().

What issues does this PR fix or reference?

Fixes: #62030
Fixes: #62031
Fixes: #62032

Previous Behavior

name and pkgs parameters are ignored in zypperpkg.upgrade(). The diff_attr parameter is ignored by both yumpkg.upgrade() and zypperpkg.upgrade()

New Behavior

name and pkgs parameters are used in zypperpkg.upgrade to only update/upgrade the specified package(s). diff_attr is used by zypperpkg.upgrade() and yumpkg.upgrade() to output additional attributes.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@agraul agraul requested a review from a team as a code owner May 6, 2022 11:24
@agraul agraul requested review from krionbsd and removed request for a team May 6, 2022 11:24
SchoolGuy
SchoolGuy previously approved these changes May 6, 2022
Copy link

@SchoolGuy SchoolGuy left a comment

Choose a reason for hiding this comment

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

I have debugged this together with @agraul. The PR is LGTM for me.

@Ch3LL
Copy link
Contributor

Ch3LL commented Sep 20, 2022

looks like there is a test failure that might be related to this change

@agraul
Copy link
Contributor Author

agraul commented Sep 30, 2022

looks like there is a test failure that might be related to this change

After rebasing the PR on top of the current master commit, I don't see the test failure locally anymore. Let's see if jenkins' test executions agree.

salt/modules/yumpkg.py Show resolved Hide resolved
@Ch3LL Ch3LL added Sulfur v3006.0 release code name and version and removed has-failing-test labels Sep 30, 2022
pkg_resource.format_pkg_list expects its `attr` argument to be either a
list of attributes or the string "all" to indicate all available
attributes should be used for formatting.

Fixes: saltstack#62032
diff_attr works just like it does for pkg.install. Having the
option to return additional attributes can remove the need for a
follow-up list_pkgs call.

Fixes: saltstack#62031
@Ch3LL Ch3LL merged commit 63cee6c into saltstack:master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Priority 1 Sulfur v3006.0 release code name and version
Projects
None yet
3 participants