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 can't set asset metadata

    Scheduled Pinned Locked Moved Support
    8 Posts 3 Posters 31 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.
    • J Offline
      jfullmer_7346
      last edited by jfullmer_7346

      I'm trying out pgutil for adding some automation for the metadata in our assets (i.e. updating an asset file and metadata of its version)

      I'm using the latest pgutil version 2.1.12 with the latest proget 2025.0.5 with the postgres backend.
      We're using the integrated web server on http default port 8624 with iis as an https reverse proxy to that (in case it matters).
      I have tried adding the pgutil source with both the https url and the http url.
      I can always get the metadata of the object, i.e. (running in powershell, not as admin)

      & C:\temp\pgutil.exe sources add --name=Default --url="https://proget.domain.local" --api-key="$($apiKey)"
      pgutil assets metadata get --path="ExternalExes/Microsoft/odt.exe" --feed=resources
      #returns:
      Name: odt.exe
      Size: 3799536
      Type: https://proget.domain.local/endpoints/resources/content/ExternalExes/Microsoft/odt.exe
      Created: 4/15/2025 3:22:11 PM
      Modified: 4/15/2025 3:22:11 PM
      Caching: Not set (inherit)
      
      -- Hashes --
      MD5: hash
      SHA1: hash
      SHA256: hash
      SHA512: hash
      
      -- Custom Metadata --
      updateUrl: https://www.microsoft.com/en-us/download/confirmation.aspx?id=49117
      version: 16.0.16731.20290
      

      But then I try to update that (running in powershell)

      & C:\temp\pgutil.exe assets metadata set custom --path="ExternalExes/Microsoft/odt.exe" --feed=resources --key="version" --value="16.0.18925.20138" --include-in-http-response
      #returns
      Setting version = 16.0.18925.20138 on ExternalExes/Microsoft/odt.exe...
      Server responded with InternalServerError (500): 42703: column "target" of relation "AssetItemMetadata" does not exist
      

      If I run it in .\ context in the same directory.

      cd C:\temp
      .\pgutil assets metadata set custom --path="ExternalExes/Microsoft/odt.exe" --feed=resources --key="version" --value="16.0.18925.20138" --include-in-http-response
      #returns
      Setting version = 16.0.18925.20138 on ExternalExes/Microsoft/odt.exe...
      Server responded with InternalServerError (500): Exception while reading from stream
      

      In this above example it did sit at the 'setting version' for a bit before erroring out.

      I'm not seeing anything related in the logs available in the web gui, perhaps there's somewhere else I should look or maybe there's some simple syntax thing I'm missing?

      Thanks,
      -JJ

      1 Reply Last reply Reply Quote 0
      • J Offline
        jfullmer_7346
        last edited by

        I also attempted the same idea using the rest api

        i.e.

        sent this json in a post to the endpoint

        {
          "userMetadata": {
            "version": {
              "includeInResponseHeader": "True",
              "value": "16.0.18925.20138"
            }
          },
          "userMetadataUpdateMode": "update",
          "type": "application/json"
        }
        

        Still get the same basic error message

        Invoke-RestMethod: 42703: column "target" of relation "AssetItemMetadata" does not exist
        

        Tried omitting the http response header boolean to no avail and tried creating a new key/value to no avail.

        1 Reply Last reply Reply Quote 0
        • rhessingerR Offline
          rhessinger inedo-engineer
          last edited by

          Hi @jfullmer_7346,

          Thanks for sending this over to us. This looks to be related to an issue with a stored procedure only used by this specific Asset metadata API. I have fixed this as part of PG-3062 and it will release this Friday in ProGet 2025.6.

          Thanks,
          Rich

          Products Engineer, Inedo

          1 Reply Last reply Reply Quote 1
          • J Offline
            jfullmer_7346
            last edited by

            Thank you! I'll try to remember to report back after we update to that version.

            1 Reply Last reply Reply Quote 0
            • L Offline
              layfield_8963
              last edited by

              Hi,

              I am running version 2025.7 and experiencing the same problem.

              Server responded with InternalServerError (500): 42703: column "target" of relation "AssetItemMetadata" does not exist

              Thanks

              1 Reply Last reply Reply Quote 0
              • rhessingerR Offline
                rhessinger inedo-engineer
                last edited by

                Hi @layfield_8963,

                Just to verify, is your instance using SQL Server or PostgreSQL? Also, can you please provide me the command you are using to recreate that issue? That will allow us to more quickly identify the issue.

                Thanks,
                Rich

                Products Engineer, Inedo

                1 Reply Last reply Reply Quote 0
                • L Offline
                  layfield_8963
                  last edited by

                  Hi,
                  We are using postgres.

                  Here is the command output:

                  pgutil assets metadata set custom --path=test.txt --feed=test-import-data --key=test123 --value=12345
                  Setting test123 = 12345 on test.txt...
                  Server responded with InternalServerError (500): 42703: column "target" of relation "AssetItemMetadata" does not exist
                  
                  1 Reply Last reply Reply Quote 0
                  • rhessingerR Offline
                    rhessinger inedo-engineer
                    last edited by

                    Hi @layfield_8963,

                    I'm having trouble recreating this error. I just stood up a clean install of ProGet 2025.7, created an asset directory, and uploaded a file to it. I then ran the command you sent and this is what I see:

                    pgutil.exe assets metadata set custom --path=test.txt --feed=test-import-data --key=test123 --value=12345
                    Setting test123 = 12345 on test.txt...
                    Metadata set.
                    

                    Can you please navigate to Administration -> Software Info and copy and paste the contents of that here? If you feel more comfortable, you can email it to support@inedo.com with the subject [QA-2790] Database Information. If you email it, please let us know when you do so we can look for it in that mailbox. The only thing I can think of is that your database schema did not update properly on upgrade.

                    Thanks,
                    Rich

                    Products Engineer, Inedo

                    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