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!

    'pgutil upack install' fails when feed has non semver versions

    Scheduled Pinned Locked Moved Support
    6 Posts 4 Posters 22 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.
    • L Offline
      lukas.christel_6718
      last edited by lukas.christel_6718

      Issue:
      Running pgutil upack install --source=my-repo --feed=my-feed --target=.\upack\ --package=MyPackageName --version=0.0.2-199100
      I had a universal package with a version that does not conform to Semver (it contained an underscore) in my ProGet universal feed and got an exception (see below). Based on the exception I assumed there is an issue in how I write the version in the pgutil upack command. I did not realise the issue was that the feed has a non compliant package.

      Suggested easy fix:
      Include the string that failed to parse in the exception message in file Inedo.ProGet.UniversalPackages.UniversalPackageVersion.cs on line 295 like so error = $"String '{s ?? string.Empty}' is not a valid semantic version.";.
      This should make it easy for the user to figure out what is going on.

      Unhandled exception. System.ArgumentException: String is not a valid semantic version.
         at Inedo.ProGet.UniversalPackages.UniversalPackageVersion.Parse(String s) in /_/Inedo.ProGet/UniversalPackages/UniversalPackageVersion.cs:line 107
         at PgUtil.Program.UpackCommand.GetPackageAsync(CommandContext context, CancellationToken cancellationToken) in /_/pgutil/Upack/UpackCommand.cs:line 146
         at PgUtil.Program.UpackCommand.GetPackageAsync(CommandContext context, CancellationToken cancellationToken) in /_/pgutil/Upack/UpackCommand.cs:line 144
         at PgUtil.Program.UpackCommand.InstallCommand.ExecuteAsync(CommandContext context, CancellationToken cancellationToken) in /_/pgutil/Upack/InstallCommand.cs:line 46
         at ConsoleMan.Command.ExecuteAsync(String[] args)
         at PgUtil.Program.Main(String[] args) in /_/pgutil/Program.cs:line 38
         at PgUtil.Program.<Main>(String[] args)
      

      Suggested alternative fix:
      pgutil upack install can deal with non semver packages on the feed and just does not install them. upack already knows not to match to them because the user provided parameter is already validated to be semver compliant.

      1 Reply Last reply Reply Quote 0
      • L Offline
        lukas.christel_6718
        last edited by

        By the way, thank you for hosting the source code publicly. I would not have been able to figure this out otherwise.

        dean-houstonD 1 Reply Last reply Reply Quote 0
        • dean-houstonD Offline
          dean-houston inedo-engineer @lukas.christel_6718
          last edited by

          @lukas-christel_6718 just a heads up we're a bit slammed with ProGet 2025 release but will respond soon!

          1 Reply Last reply Reply Quote 0
          • Dan_WoolfD Offline
            Dan_Woolf inedo-engineer
            last edited by

            Hi @lukas-christel_6718,

            You mentioned that your version had an underscore in it, but the command you referenced does not have an underscore. Is this something that once you add a package with a bad version, then any package fails to install, any version of a package with the same group and name fails to install, or just the specific package with the bad version fails to install? Also, can you please send us the bad version that you uploaded to the feed? Once we have that information, we should be able to reproduce your issue and get a fix out for you.

            Thanks,
            Dan

            1 Reply Last reply Reply Quote 0
            • L Offline
              lukas.christel_6718
              last edited by

              The issue occurs when I try to install a package that complies with semver. The presence of a package with a non-semver version is enough to fail the installation of other packages with the same name (maybe all other packages with the same name). Installing a package from the same feed with a different name still succeeds.
              I manually created demo packages to reproduce the issue. I first uploaded the bad version to the proget feed (don't know if that matters) through the manual file upload in the web interface, then the good version. The issue occurs when I try to install the good version.
              The issue happens when pgutil tries to parse the available versions on the server (see call stack in first post) AFTER it already successfully parsed the requested version from the command.

              I couldn't find a general file upload. Here are the upack.json used to create the demo packages

              
                                      { 
                                          "name" : "DEMO-5418",
                                          "version" : "1.0.0-bad_version",
                                          "createdDate" : "2025-06-16T17:17:15Z"
                                      }
                                      
              
              
                                      { 
                                          "name" : "DEMO-5418",
                                          "version" : "1.0.0-good-version",
                                          "createdDate" : "2025-06-16T17:18:10Z"
                                      }
                                      
              
              1 Reply Last reply Reply Quote 0
              • rhessingerR Offline
                rhessinger inedo-engineer
                last edited by

                Hi @lukas-christel_6718,

                Sorry for the delay on this. We just pushed an updated pgutil that will now skip over any invalid versions.

                Thanks,
                Rich

                Products Engineer, Inedo

                1 Reply Last reply Reply Quote 1

                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