Skip to content

✨ Enable better testing via Buildkitd-in-Buildkitd #2246

Closed

Description

@sipsma

What are you trying to do?

Several things:

  1. Test Dagger against custom builds of buildkitd, including local changes needed for debugging issues (i.e. Duplicate log messages #449)
  2. Test Dagger against different configurations of buildkitd without having to impact my existing buildkitd spun up automatically by Dagger. I.e. I might want to test against different executor backends (runc vs. containerd) or with an empty cache.
  3. Test complicated workflows like starting+stopping buildkitd, upgrading from one buildkitd version to another, exporting cache and importing in another, having multiple Dagger clients connect to the same daemon, etc.

Why is this important to you?

As a Dagger developer, I want to develop and test Dagger using my favorite tool for development and testing: Dagger. We need a way of testing complicated scenarios involving buildkit, and Dagger just so happens to be the perfect tool for doing so.

How are you currently working around this?

I have some cue that automates building buildkitd from local sources and then runs it in docker, after which I can point my dagger client to it using BUILDKIT_HOST. However, that creates state that I have to manage outside of a single Dagger plan invocation and would get very complicated for some of the more advanced testing scenarios described above.

It would be much better if there was a single Dagger action that setup custom buildkitd(s) using AsyncExec and then ran dagger clients against it. That would let me orchestrate the whole process in a single action invocation.

Activity

  1. sipsma commented on Apr 20, 2022

    @sipsma
    ContributorAuthor

    As a side-note, we obviously need to maintain the ability to test Dagger outside of Dagger for cases where the circular dependency becomes an issue. I think you can approach this by splitting tests up so that the test cases themselves can be executed outside of Dagger, but there is a higher-level wrapper that allows you to orchestrate the setup+invocation of those tests using Dagger if desired.

  2. changed the title [-]✨ Enable better testing via Dagger-in-Dagger[/-] [+]✨ Enable better testing via Buildkitd-in-Buildkitd[/+] on May 10, 2022
  3. sipsma commented on Dec 21, 2022

    @sipsma
    ContributorAuthor

    Not sure this is relevant anymore, in 0.3 we test dagger in dagger.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions