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!

    pgscan not sending --consumer-package-source

    Scheduled Pinned Locked Moved Support
    7 Posts 4 Posters 12 Views 1 Watching
    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.
    • J Offline
      jeff.peirson_4344
      last edited by

      If I understand the pgscan tool correctly, the --consumer-package-source arg maps to this field from the ProGet UI when you manually add a package consumer for a nuget package:

      e73162c4-3723-4853-89c5-77e2f20aad72-image.png

      If I test manually adding a consumer via the UI with some existing feed name for "Source feed/url", the consumer is listed in the UI with as a link to my consumer package in ProGet, which is what I'd expect (which makes tracking dependencies nice and easy).

      If I specify the same feed name in pgscan, I don't see the same kind of link in the consumer list in the UI - it's just static text like "MyGroup/MyPackage v2.0.0-alpha.117". Looking at the HTTP traffic that pgscan sends to ProGet, I don't even see the feed name that I set for the consumer package source.

      Sample pgscan cmd line:

      pgscan publish --type=nuget --package-feed=feed-a --proget-url=https://proget.local --consumer-package-name=MyPackage --consumer-package-group=MyGroup --consumer-package-version=2.0.0-alpha.117 --consumer-package-source=feed-b --api-key=xxx --input=MyPackage.csproj
      

      Screenshot of what pgscan sent to the /api/dependencies/dependents endpoint, captured from Fiddler:

      6d610904-c2b2-4b4f-b323-d14165ef00d4-image.png

      Is this bug in pgscan? or am I misunderstanding what --consumer-package-source is for?

      stevedennisS 1 Reply Last reply Reply Quote 0
      • stevedennisS Offline
        stevedennis inedo-engineer @jeff.peirson_4344
        last edited by

        Hi @jeff-peirson_4344 ,

        That's definitely what it's intended for, so I think this must be a bug...

        I haven't had a chance to reproduce or look any further, but I wanted to at least share the code ASAP...

        https://github.com/Inedo/pgscan/blob/master/pgscan/Program.cs#L90

        ... so please feel free to look/fix yourself, but we'll also take a look in the coming days as well! Just an FYI.

        Thanks,
        Steve

        1 Reply Last reply Reply Quote 0
        • J Offline
          jeff.peirson_4344
          last edited by

          Thanks @stevedennis , I'll look into fixing this.

          What is the name for the consumer source field in the /api/dependencies/dependents request body? I see an example in the package consumer docs, but the example doesn't specify a consumer source. And I see the request body JSON in ProGetClient.cs, but not sure what JSON property name to give to the PackageConsumer.Feed/.Url without just guessing.

          Thanks,
          -Jeff

          1 Reply Last reply Reply Quote 0
          • J Offline
            jeff.peirson_4344
            last edited by

            Ignore my question from my previous comment - guessing the field names wasn't hard after all. Looks like they are dependentFeed and dependentUrl.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jeff.peirson_4344
              last edited by

              I've fixed this in https://github.com/Inedo/pgscan/pull/3 .

              I did some minimal testing with providing a feed name vs a source URL in pgscan, which at least worked for me.

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

                Thanks @jeff-peirson_4344 ! That's great. I'm going to assign this to a senior engineer to review (looks good to me), and then we'll merge/publish a new version next week.

                And of course if you have any other suggestions on how to improve, please let us know. This feature came directly from a user collaboration - https://blog.inedo.com/feature-not-a-bug

                1 Reply Last reply Reply Quote 0
                • gdivisG Offline
                  gdivis inedo-engineer
                  last edited by

                  I've merged this pull request and published v1.0.2 with the change. Thanks for the fix!

                  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