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

Implicitly ignore epoch when no epoch in desired version, and ignore_epoch not passed #56681

Merged
merged 3 commits into from
Apr 22, 2020

Conversation

terminalmage
Copy link
Contributor

@terminalmage terminalmage commented Apr 17, 2020

What does this PR do?

A usability tweak for pkg states on platforms that support pkg epochs.

In the process of adding a test case for this, I encountered a major testing oversight that was merged on Jan 9th in #55707. By moving the lists of package targets into the class, they weren't defined until after the decorators had already ran. This means that most of these decorated tests were being skipped all the time, on all platforms. Not great, Bob!

I've moved the skip logic back within the actual tests, where they were before the decorators were added last autumn in 291579c.

What issues does this PR fix or reference?

#56654

#55707

Previous Behavior

Epochs were strictly enforced in package comparisons (i.e. 2.3-4 would not be a match if the actual version of the package was 1:2.3-4), unless ignore_epoch was set to True.

New Behavior

Now, when no value is explicitly passed this argument, the epoch will be implicitly skipped if the desired version does not itself contain an epoch. This will allow for much more natural version handling, instead of requiring the user to always know beforehand when they are dealing with a package that has an epoch in the version.

Merge requirements satisfied?

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

  • Docs
  • Changelog
  • Tests written/updated

Commits signed with GPG?

No

Copy link
Contributor

@cmcmarrow cmcmarrow 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. Thanks for the work

@dwoz dwoz merged commit 54cfec8 into saltstack:master Apr 22, 2020
@sagetherage sagetherage added the ZRelease-Sodium retired label label May 18, 2020
@terminalmage terminalmage deleted the issue56654 branch February 12, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZRelease-Sodium retired label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants