Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13680

Deleting plan history should remove data from remote host that ran the build

    • Icon: Suggestion Suggestion
    • Resolution: Tracked Elsewhere
    • None
    • Agents, Expiry
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      If you navigate to a plan's history and remove a build number that was run on a remote agent, the remote agent will not remove build data (logs, artifacts) as would happen if the agent were on the local Bamboo server. Triggering a delete should clear the agent's build data regardless of agent type/location.

            [BAM-13680] Deleting plan history should remove data from remote host that ran the build

            Agent uses single directory for running a job. This is the lowest resolution we can use for deleting the data. Because of that it is not possible to remove single build result on agent.

            Please follow https://jira.atlassian.com/browse/BAM-13589 to track solution for removing obsolete directories from agent home directory.

            Krystian Brazulewicz added a comment - Agent uses single directory for running a job. This is the lowest resolution we can use for deleting the data. Because of that it is not possible to remove single build result on agent. Please follow https://jira.atlassian.com/browse/BAM-13589  to track solution for removing obsolete directories from agent home directory.

            +1 for sooner than later, very annoying and error prone on live servers...

            Luke Weisensee added a comment - +1 for sooner than later, very annoying and error prone on live servers...

            Few words of comment on this issue. We believe that Build Expiry and problem of space consumed on the agent are not related - let me explain what I mean here.
            Build Expiry removes specific build results according to conditions defined in Bamboo administration or Plan configuration. Agent on the other hand doesn't keep history of builds for a given plan. It always uses the same directory for building specific Job.
            We believe that Clean working directory after each build option in the Plan configuration is the proper solution for this problem. You might be also interested in voting on https://jira.atlassian.com/browse/BAM-13589 which also relates to the problem of disk space usage on agents.

            Krystian Brazulewicz added a comment - Few words of comment on this issue. We believe that Build Expiry and problem of space consumed on the agent are not related - let me explain what I mean here. Build Expiry removes specific build results according to conditions defined in Bamboo administration or Plan configuration. Agent on the other hand doesn't keep history of builds for a given plan. It always uses the same directory for building specific Job. We believe that Clean working directory after each build option in the Plan configuration is the proper solution for this problem. You might be also interested in voting on https://jira.atlassian.com/browse/BAM-13589 which also relates to the problem of disk space usage on agents.

            Yes, that's the command we ran as well. We put it inside a cron job which runs at 2 AM each day (since we do not have any overnight builds - they all stop once everyone goes home). And +1 for the 'Clean working directory after each build' 

            David Paquin added a comment - Yes, that's the command we ran as well. We put it inside a cron job which runs at 2 AM each day (since we do not have any overnight builds - they all stop once everyone goes home). And +1 for the 'Clean working directory after each build' 

            Boris, you can just do an rm -rf on the directory, it'll make the folders it needs next time it runs. You can also get fancy with trying to list out only old files and delete them. I turned on "Clean working directory after each build" for most of my plans (it's under Miscellaneous), unless I'm debugging them. 

            Bayley Gaillard added a comment - Boris, you can just do an rm -rf on the directory, it'll make the folders it needs next time it runs. You can also get fancy with trying to list out only old files and delete them. I turned on "Clean working directory after each build" for most of my plans (it's under Miscellaneous), unless I'm debugging them. 

            Which job/scheduled task was suggested? Can you share it please?

            boris_alyurov_prcm added a comment - Which job/scheduled task was suggested? Can you share it please?

            Same issue here. After talking with Atlassian support they've suggested we set up a cron job/scheduled task to delete the contents of the build directory nightly. This workaround has solved our problem, but it would still be nice to see this in the product itself. For customers who are heavily using the build agents and have plans that run overnight this would be trickier to solve (you'd need to make sure your clean up script only runs when no builds are active, and that no builds start during your clean up time). 

            David Paquin added a comment - Same issue here. After talking with Atlassian support they've suggested we set up a cron job/scheduled task to delete the contents of the build directory nightly. This workaround has solved our problem, but it would still be nice to see this in the product itself. For customers who are heavily using the build agents and have plans that run overnight this would be trickier to solve (you'd need to make sure your clean up script only runs when no builds are active, and that no builds start during your clean up time). 

            Betty Li added a comment -

            Expiry does not appear to run on Remote agents.

            Betty Li added a comment - Expiry does not appear to run on Remote agents.

            This is ridiculous. My remote agents run out of disk space frequently, which prevents builds from running. The builds should absolutely be cleaned up according to expiry settings. Otherwise, what is expiry for?

            Bayley Gaillard added a comment - This is ridiculous. My remote agents run out of disk space frequently, which prevents builds from running. The builds should absolutely be cleaned up according to expiry settings. Otherwise, what is expiry  for ?

            Thanks for the suggestion!

            James Dumay added a comment - Thanks for the suggestion!

              Unassigned Unassigned
              alaskowski Adam Laskowski (Inactive)
              Votes:
              16 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: