setup-buildx-action icon indicating copy to clipboard operation
setup-buildx-action copied to clipboard

Post job `cleanup` takes a long time.

Open sinwoobang opened this issue 1 year ago • 4 comments

Behaviour

Steps to reproduce this issue

  1. Setup this job generally.
  2. Append a remote builder as discussed on (https://github.com/docker/setup-buildx-action/issues/115). Especially, using this shortcut on the comment.
  3. Build multi-arch images remotely using buildx.
  4. Start your workflow and see how long it takes to be removed at the last.

Expected behaviour

The builder is removed in a couple of seconds, or at most a minute.

Actual behaviour

It took 15 minutes.

Configuration

  • Repository URL (if public): X
  • Build URL (if public): X
- name: Set up Docker Buildx
  id: builder
  uses: docker/setup-buildx-action@v1

- name: Append ARM buildx builder from AWS
  uses: baschny/append-buildx-action@v1
  with:
    builder: ${{ steps.builder.outputs.name }}
    endpoint: ${{ secrets.SSH_ENDPOINT }}
      ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

Logs

I would like to say sorry that I can't attach the log here due to security reasons. Instead, I put a screenshot. It took 16 minutes. Screen Shot 2022-09-05 at 12 07 17 AM

Post job cleanup.
Removing builder
  /usr/bin/docker buildx rm builder-e772f6ea-5196-4636-9999-91548ad9ce9f
  builder-e772f6ea-5196-4636-9999-91548ad9ce9f removed

sinwoobang avatar Sep 04 '22 15:09 sinwoobang

@baschny It is for your information.

sinwoobang avatar Sep 04 '22 15:09 sinwoobang

Is it mandatory to remove the builder on the post job? Do you have any idea about what would happen if I don't remove the builder?

sinwoobang avatar Sep 04 '22 15:09 sinwoobang

@sinwoobang For me the removal takes 2s in my jobs, so something is fishy in your setup, I guess.

Does it constantly do that? maybe it was just a temporary problem? Does it work faster if you do not append an SSH builder in between? Are you using the latest buildx action and also ubuntu-latest image for the build process? Maybe you have other stuff in your setup which might be interfering (i.e. activating QEMU, etc)? Would be interesting to see your whole setup.

baschny avatar Sep 04 '22 17:09 baschny

@baschny

Does it constantly do that? maybe it was just a temporary problem?

Yes. it is repeatedly happening.

Does it work faster if you do not append an SSH builder in between?

Yes. it works faster if I do not append it.

Are you using the latest buildx action and also ubuntu-latest image for the build process?

Yes.

Maybe you have other stuff in your setup which might be interfering (i.e. activating QEMU, etc)?

I do not think so. The remote server is only for this workflow. Thus, it is clean, and no such thing as QEMU works.

In my opinion, it may be because of the size of the images. What size does your image have that takes 2s to get rid of?

sinwoobang avatar Sep 06 '22 06:09 sinwoobang