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

(maint) Finish the 2.4.1 release by merging master to develop #3587

Merged
merged 20 commits into from
Dec 5, 2024
Merged

Conversation

corbob
Copy link
Member

@corbob corbob commented Dec 5, 2024

Back-merging changes from master to develop

corbob and others added 20 commits November 20, 2024 04:58
Prepare-Chocolatey-Package previously would fail if not run as part of a
target that also included copying the nuspec files. This commit makes
the task dependency explicit so you can directly run
Prepare-Chocolatey-Package.
Changed the logic for skipping an MSI build to skip it by default, and
no longer depend on a tagged build. This will allow developers to
generate an MSI by adding `--shouldBuildMsi=true`.
When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
As with the previous commit, this adds the configuration for GitHub
Actions. Thus allowing us to ensure the MSI is able to be built in
GitHub Actions as well.

When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
When the tests are run against the download command, the second run was
failing due to already having downloaded the package. Remove the
download directory to ensure the tests function the same.
(#3465) Allow building an MSI during outside of tagged commits.
This updates the handling of searching for packages while at the same
time specifying the version that is wanted of the packages.

This ensures that packages will be looked up to verify it has the
version the user wants, before returning any results.
(#3396) Add specific version check on v3 searches
Previously we looked up any available sources in the config by the
hostname, before falling back to trying an exact match if we had
collisions.

This still allowed credentials to be reused in situations where we don't
actually know if they're applicable; many repository servers will
support different credentials for individual repositories, so we cannot
and should not assume that credentials for one repository will actually
match another repository, nor that users want the credentials to be
shared for both.

It also led to the possibility of users storing one repository first,
and then later specifying a different repository on the same server, and
choco would try to use the stored credentials for the first repository
for the explicitly-entered URL which is nowhere in config.

Instead, we should only match the whole URL (which can be done with
Uri. Equals to ensure that we match hostnames case-insensitively, but
routes case-sensitively), and expect users to provide credentials if
they provide a URL that is not explicitly in the sources.

Additionally, we try to ensure that if a user has named a specific
source, rather than themselves providing a URL at the command line, we
prioritise finding that in the already-configured sources and use that
source if the URL matches the current URL that NuGet requires a
credential for.
These tests ensure that the use cases we expect to handle in the
credential provider are appropriately handled according to our
expectations, based on the user-provided input and the transformed input
that is left in configuration.Sources once the credential provider
typically gets queried.
Add Pester tests to ensure we don't inadvertently bleed configured
credentials into scenarios where they should not be used.
Since we've added an ExplicitSources property to the top-level
configuration object, we do not need the ListCommand.ExplicitSource
property. It is being deprecated here to be removed in version 3. To
determine if an explicit source was provided, we can look at if
ExplicitSources is set.
Add some comments to the Pester Tests to better describe the purpose of
the test and why some commands are expected to exit 0 and others not.
(#3565 #2421) Avoid credential bleed from saved sources with the same hostname
Add the push source to configuration so that we are able to push to it
successfully. When anonymous access is disabled, Chocolatey will now
only use credentials it has configured by the exact source URL, and not
just one that matches the hostname. As such, this test started failing
and needs to be updated to ensure the credentials can be used.

See #2026 for more details.
Correct the Licensed version capture so that the regex matches when
Licensed Extension with User Agent update is installed. Also adds a
validation that the LicensedVersion is present when Licensed Extension
is installed.
@corbob corbob self-assigned this Dec 5, 2024
@corbob corbob requested a review from vexx32 December 5, 2024 00:01
@vexx32 vexx32 merged commit 7335f19 into develop Dec 5, 2024
13 checks passed
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.

4 participants