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



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


  • inedo-engineer

    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



  • 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



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



  • 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.


  • inedo-engineer

    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


  • inedo-engineer

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


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation