Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post job cleanup takes a long time. #158

Closed
sinwoobang opened this issue Sep 4, 2022 · 6 comments · Fixed by #213
Closed

Post job cleanup takes a long time. #158

sinwoobang opened this issue Sep 4, 2022 · 6 comments · Fixed by #213

Comments

@sinwoobang
Copy link

Behaviour

Steps to reproduce this issue

  1. Setup this job generally.
  2. Append a remote builder as discussed on (Feature request: append builder #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
Copy link
Author

@baschny It is for your information.

@sinwoobang
Copy link
Author

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?

@baschny
Copy link

baschny commented Sep 4, 2022

@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.

@sinwoobang
Copy link
Author

sinwoobang commented Sep 6, 2022

@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?

@raghur
Copy link

raghur commented Feb 1, 2023

So in my case, I'm seeing 4m35s repeatedly to clean up - that sort of kills the joy of reducing 6m from the build step. What does the clean up depend upon?

For ref: I'm running on selfhosted runner and it's single platform linux/amd64 only (no QEMU stuff).
What does the time for the clean up depend on?

In my case - the removal takes almost all of the time

Removing builder
  /usr/local/bin/docker buildx rm builder-24d10bad-f440-4585-9f47-2901b11daf32
  builder-24d10bad-f440-4585-9f47-2901b11daf32 removed

@crazy-max
Copy link
Member

I'm fine to have an input to disable builder removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants