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

(#1541) Add priority ordering for repository optimizations #2286

Merged
merged 1 commit into from Oct 14, 2021

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented Jun 7, 2021

Description Of Changes

This pull requests re-adds the ability to order sources by priority when installing and upgrading packages.

Motivation and Context

Priority currently are not respected due to to sorting is done on prioritized sources.

Testing

  1. Manually set a higher priority on a source containing a package in a non-prioritized source with a lower version available.
  2. Call Chocolatey installation command and see what package version would be installed.
  3. Do the same test with both sources being unprioritiesed.
  4. Do the same test with both sources being the same non-zero priority.

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)

Related Issue

Fixes #1541

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed.

@AdmiringWorm AdmiringWorm requested a review from gep13 June 7, 2021 16:13
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

A couple minor changes based on a quick review.

@gep13
Copy link
Member

gep13 commented Oct 3, 2021

@AdmiringWorm would it be possible for you to update this PR with the new template that we are using in other repositories, i.e. include information about the testing that was performed (in addition to the new tests which have been added - thanks for getting those added!)

@AdmiringWorm AdmiringWorm changed the base branch from master to develop October 4, 2021 08:48
@AdmiringWorm
Copy link
Member Author

@gep13 I have fixed the requested changes, updated the template for the PR and changed the PR to target the develop branch (instead of the old master branch).

The testing steps added was added from memory, and not the same exact steps I had done back when I opened the PR.

This commit re-adds the ability to order sources according to
a specified priority.
This ability seems to have been lost due to changes in the codebase in
the past and thus needed to be re-implemented when the repository optimization
is enabled.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13
Copy link
Member

gep13 commented Oct 14, 2021

@AdmiringWorm I am going to go ahead and get this merged in. The failing AppVeyor build is something that I need to look at, but it is not as a result of the changes in this PR, since the GitHub Action builds are completing successfully.

@gep13 gep13 merged commit 70c7dcf into chocolatey:develop Oct 14, 2021
@AdmiringWorm AdmiringWorm deleted the source-priority branch October 21, 2021 11:04
gep13 added a commit that referenced this pull request Oct 26, 2021
This reverts commit 70c7dcf, reversing
changes made to 9c30958.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

choco source priority is ignored
2 participants