Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    GET Request "lt" operator not working for a string in ProGet v2024.16

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 16 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sneh.patel_0294
      last edited by

      Hi, we are currently testing the upgrade from version ProGet 6.0.20 to 2024.16 on a test ProGet instance. One of the tests resulted in an error relating to a simple GET request:

      An error occurred processing a GET request to https://test-endpoint/nuget/auto-int-cps/Packages()?$filter=Id eq 'CPS.Regression' and Version lt '9.1' and IsPrerelease eq 'False'&$top=1&$orderby=Version desc: The binary operator LessThan is not defined for the types 'System.String' and 'System.String'

      Note: Our test endpoint points to our test ProGet instance. If I change the test endpoint to our prod endpoint (pointing to our prod instance sitting on version 6.0.20), the same GET request works.

      Did the filter stop working in the newer version of ProGet? If so, what is the workaround?

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        Hi @sneh-patel_0294 ,

        This API has been deprecated for a long time. It sounds like you're doing your own, custom queries.... ProGet only supports the queries made by certain clients like NuGet. See NuGet ODATA (v2) API.

        While we haven't touched the ODATA (v2) code in many years, there must have been some other change that caused this behavior to happen. As you might imagine, we don't want to open up that code and risk introducing another regression, so it'd be best for you to work-around this issue.

        Your best bet is to switch to the Packages API; you can also use the NuGet v3 API, which is well documented and supported by ProGet, but it's a lot harder to use.

        Cheers,
        Alana

        1 Reply Last reply Reply Quote 0
        • S Offline
          sneh.patel_0294
          last edited by

          @atripp said in GET Request "lt" operator not working for a string in ProGet v2024.16:

          ou can also use the NuGet v3 AP

          Thank you for your response. Could you please point me to the NuGet v3 API documentation you are referring to? Also, how would I use the Packages API to do what the GET request is doing? The documentation for the Packages API is a bit confusing.

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @sneh.patel_0294
            last edited by

            Hi @sneh-patel_0294 ,

            Here is the NuGet API Documentation:
            https://learn.microsoft.com/en-us/nuget/api/overview

            Here is the Packages API query you would want:
            https://docs.inedo.com/docs/proget/reference-api/proget-api-packages/proget-api-packages-list-versions#http-response-specification

            Regardless of what APi you use, you'll need to change your query strategy:

            1. Get a list of all versions of CPS.Regression from the server
            2. From that list, filter by 9.1 and then sort by latest that's not prerelease

            There are some sample scripts that might be helpful on our docs as well:
            https://docs.inedo.com/docs/proget/reference-api/proget-api-packages/proget-api-packages-list-versions#list-all-non-prerelease-versions-powershell

            Thanks,
            Alana

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation