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!

    ProGet Release Retention Policies + API Delete

    Scheduled Pinned Locked Moved Support
    releasesscaretentionprogetapi
    4 Posts 2 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.
    • M Offline
      mness_8576
      last edited by

      I was looking for settings to be able to set up retention policies for releases in Reporting & SCA for ProGet 2023.6 without BuildMaster, and I didn't come across anything in Administration or find any documentation around that. I was planning to fall back on writing a tool for this myself, but SCA Projects & Releases API documentation doesn't appear to include an endpoint for deleting releases. If you would please let me know

      1. whether it's possible to configure retention policies for ProGet Reporting & SCA releases at this time without using BuildMaster and where to find that setting if it is and
      2. whether there's an API that I might have missed that would allow me to automate retention myself by writing tooling to delete ProGet releases as they become stale (maybe an update action that sets the active flag to false is equivalent to a delete?)

      I'd appreciate it. Thanks!

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

        Hi @mness_8576 ,

        For now, archiving is the way to do it. Looking at the code too, it doesn't look like there's even an API to do it...

        Here is the code that BuildMaster uses, which clearly just sets the archive flag:

            /// <summary>
            /// Creates or updates the specified release with the specified data
            /// </summary>
            public async Task EnsureRelease(string projectName, string releaseNumber, string? releaseUrl, bool? active, CancellationToken cancellationToken = default)
            {
                using var response = await this.http.PostAsJsonAsync(
                    "api/sca/releases",
                    new
                    {
                        project = projectName,
                        version = releaseNumber,
                        url = releaseUrl,
                        active
                    },
                    cancellationToken
                ).ConfigureAwait(false);
        
                response.EnsureSuccessStatusCode();
            }
        

        Otherwise, we don't have automated deletion or retention policies for archived SCA releases; they don't take up much space (relatively speaking), and we didn't want to commit to retention rules so early on in the feature.

        If they become a problem (UI, performance, etc.), it's easy enough to delete a bunch via SQL for the time being... and that'll help us learn how to create policies. And we can add to API and all that :)

        Cheers,
        Alana

        1 Reply Last reply Reply Quote 0
        • M Offline
          mness_8576
          last edited by

          Thanks @atripp, I appreciate the help! We're more concerned about reducing UI clutter than about space usage in this case, in particular because we're pushing data about pre-release builds in addition to production so we can catch issues ahead of releases but we don't need pre-release data to stick around. I'll keep in mind that SQL is another option for removing these and reclaiming space, though personally I'd prefer to stick with the API approach unless space becomes an issue.

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

            @mness_8576 thanks! We definitely welcome feedback on the UI/UX - this is a new feature, so there's a lot of room to improve :)

            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