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

Modify filter query parameter #1761

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

anamnavi
Copy link
Member

@anamnavi anamnavi commented Dec 6, 2024

Modify $filter query parameters IsLatestVersion and IsAbsoluteVersion to be IsLatestVersion eq true or IsAbsoluteVersion eq true for Artifactory to resolve Artifactory issue. For ADO Search() based queries including eq true returns a BadRequest error so it's not included.

Based on the API call Artifactory is performing as supplied here: PowerShell/PowerShellGallery#273 (comment)

the count returns 1 but the response doesn't include a package, however including the eq true actually honors the filter and the response is successful in getting a package from PSGallery (from our testing).

PR Summary

PR Context

Resolves #1656

PR Checklist

…o include eq true to resolve Artifactory issue
@sean-r-williams
Copy link
Contributor

sean-r-williams commented Dec 17, 2024

I can confirm that this does mitigate the issue with Artifactory as described in #1656.

My one point of feedback here is that restricting this change to Artifactory might not fully capture the problem/solution at hand.

The "real" bug here is Gallery's poor handling of IsLatestVersion and so on (I think we already aligned on that in the other issues). This shows up in Artifactory because AF proxies NuGet v2 API calls unedited to upstream remotes. However, I don't think Artifactory is the only NuGet provider that does this (in the context of remote NuGet feeds). I provided more context in #1656 (comment).

Some suggestions:

  • Adjust the scope of this change from _isJfrogRepo to !_isADORepo - that is, turn it on for any package management provider where it doesn't actively break things
  • Add some commentary to indicate that this isn't an Artifactory/JFrog problem, but rather "any PMP that passes queries upstream unedited" (Does Sonatype Nexus have this problem? Are there other PMPs customers use? How do they handle remote-feed proxying?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to update PSResourceGet via Artifactory remote repo
3 participants