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

Merged
merged 6 commits into from
Jan 7, 2025
Merged

Modify filter query parameter #1761

merged 6 commits into from
Jan 7, 2025

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?)

@anamnavi
Copy link
Member Author

anamnavi commented Jan 7, 2025

@sean-r-williams happy new year and my apologies for the late reply. Thank you for the detailed feedback, while I agree that this behavior could happen with other PMPs, our concern is that we don't have enough data on those other ones like Sonatype Nexus to enable this behavior for any PMP that is not ADO, nor test feeds to check if it would break scenarios on those feeds. I'll add a comment saying what Artifactory (and other PMPs) may do and we can come back to it as we get feedback from users using other PMPs.

@anamnavi anamnavi merged commit c796914 into master Jan 7, 2025
4 checks passed
anamnavi added a commit that referenced this pull request Jan 8, 2025
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