Skip to content

Consider removing the image cleanup logic in pipelines #1213

Closed

Description

@mthalman

The common pipeline implementation contains logic to cleanup Docker state before and after images are built:

These steps can add a fair amount of execution time, especially on Windows agents. Some recent runs have shown this taking 5 minutes on a Windows agent.

At the time this was implemented, build agents were potentially reused between runs and it was important to keep the state of the agents clean. Since then, however, we're using stateless pools that provide fresh agents each time. So there really isn't much need to clean the agent. The one exception might be for cases where we would run out of disk space. That's most likely to happen in the .NET Framework pipeline.

So, by default, I propose that we eliminate the clean steps. If it's necessary to clean for disk space purposes, this is something that can be opted into.

Activity

  1. lbussell commented on Mar 21, 2024

    @lbussell
    Member

    [Triage] There is more investigation to be done here. We should take special care to make sure we don't include any of the Microsoft hosted runners' cached images (windows, linux) in our build output. At the very least we could remove the cleanup step from the end of the build.

  2. moved this from Backlog to Current Release in .NET Dockeron Mar 21, 2024
  3. lbussell commented on Apr 2, 2024

    @lbussell
    Member

    Removed the majority of the cleanup steps with #1229.

  4. moved this from Current Release to Done in .NET Dockeron Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions