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!

ProGet: silent fail when uploading conflicting package version



  • I've found that if i push a package with a version matching an existing version, the push will not happen, but ProGet doesn't send back any kind of warning or notification that the push did not succeed. So I'm building a thing to pull the latest version number from Proget and check prior to uploading, but it'd be nice if there was a way to get ProGet to alarm if a command doesn't succeed. Are there optional switches I can enable to do this?


  • inedo-engineer

    Hi @mcascone_8142.,

    Is the user that is pushing the packages an administrator?

    Thanks,
    Rich



  • it is pushing from Jenkins, using the official extension and an API token. The token is registered to a user with admin rights, although i'll have to double-check that.

    What is the expected behavior?
    Thanks!


  • inedo-engineer

    Hi @mcascone_8142,

    Out of the box, the administrator rights have access to overwrite a package. The reason you are not seeing an error is most likely because the package was successfully overwritten. You have two options, you can either remove the overwrite privilege from the Administer task or you could have the API key impersonate a user with a lower set of rights. Here is some documentation on how to create and customize tasks in ProGet.

    Thanks,
    Rich



  • @rhessinger thanks - i actually want it to overwrite. I'm just not getting an error when it looks like it's not doing that, based on the date of the package upload.


  • inedo-engineer

    Hi @mcascone_8142,

    What version of ProGet are you running? When I tested it in 5.3.6, I noticed the Published Date on the metadata tab changed to today.

    Thanks,
    Rich



  • @rhessinger i'm getting back to testing this now. I'm still on 5.3.0 (build 126), and i believe the api user has all the perms it needs, and it's still not overwriting.
    I tested the latest version locally, and it does overwrite. So something on my production server isn't right, or the older version acts differently.


  • inedo-engineer

    Hi @mcascone_8142,

    It is possible that this was fixed with another issue between 5.3.0 and 5.3.7. I would recommend updating 5.3.7 and testing it again. If it still happens, it would have to be a difference in tasks or how the user is configured that the API is impersonating. You could try to not impersonate a user for that API Key. The API would then run as an administrator.

    Thanks,
    Rich



  • Ok, i've got the latest version 5.3.7 on local and production, and i'm still seeing no change in the "published" date when i upload a package with an existing version number. However, in the Event Log, I do see several "Package Modified" events for that package, so it looks like the request is coming in and something is happening. Is it because I am testing this with the same exact upload package each time, so the hash is the same, so it's determining it's exactly the same package, so it doesn't update the metadata? If i change the package with a new/changed file, should it update the metadata? I'll update when i test.

    UPDATE: I added a test file to the uploaded package without changing the version. My observation is that the new package is uploaded. However there's no indication that the overwrite happened. The Event Log is the only clue, that it was Updated.

    I think what i would like to see is that history of the package in the package's history page, and a Last Updated date being added to the Metadata tab. And the full history of updates etc should be in the package's History tab.

    But at least i think i've proven that updated packages with conflicting versions are uploaded - there's just very little evidence of the overwrite happening. If there's anything else I'm missing, please let me know.
    thanks!


  • inedo-engineer

    Hi @mcascone,

    Can you please tell me what feed type you are using? Could you also include an example of the API request you are using? When I add the package manually from the UI, I noticed that the published date does change. If this is not happening with the API call, then I will need to create an internal ticket with steps to recreate it.

    Thanks,
    Rich



  • @rhessinger Hi, I'm sorry i didn't see your reply come in sooner.

    I am using a Universal Package feed.

    I'm uploading with the Jenkins extension, which i believe just wraps the API, but I'm not sure.

    It's a very simple call, it won't show much, but this is it:

      uploadProgetPackage artifacts:   env.artifact,
                          feedName:    env.feedName,
                          groupName:   env.groupName,
                          packageName: env.appName,
                          version:     env.tag 
    

    thanks
    max


  • inedo-engineer

    Hello @mcascone,

    Thanks for sending this over to me. So there looks to be an issue with the universal feed not updating the published date when overwriting a package. I happened to test 3 other feed types and it worked fine. I have created an internal ticket to fix this and I will update you as soon as it is scheduled for release.

    Thanks,
    Rich



  • @rhessinger Thank you!!


  • inedo-engineer

    Hi @mcascone ,

    We have fixed the issue and the published date will now update when the package is overwritten. This will be released in ProGet 5.3.9 which is due out this Friday Augst 14, 2020.

    Thanks,
    Rich



  • Fantastic, looking forward to it! Sorry for the work, but i'm happy to contribute in some small way as well!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation