diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a43d82344da7..7bc8120aab16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,40 +62,19 @@ jobs: - remote pkg: - ./tests - mode: - - "" - - experimental include: - worker: docker pkg: ./tests - worker: docker+containerd # same as docker, but with containerd snapshotter pkg: ./tests - - worker: docker - pkg: ./tests - mode: experimental - - worker: docker+containerd # same as docker, but with containerd snapshotter - pkg: ./tests - mode: experimental - worker: "docker@27.5" pkg: ./tests - worker: "docker+containerd@27.5" # same as docker, but with containerd snapshotter pkg: ./tests - - worker: "docker@27.5" - pkg: ./tests - mode: experimental - - worker: "docker+containerd@27.5" # same as docker, but with containerd snapshotter - pkg: ./tests - mode: experimental - - worker: "docker@26.1" - pkg: ./tests - - worker: "docker+containerd@26.1" # same as docker, but with containerd snapshotter - pkg: ./tests - worker: "docker@26.1" pkg: ./tests - mode: experimental - worker: "docker+containerd@26.1" # same as docker, but with containerd snapshotter pkg: ./tests - mode: experimental steps: - name: Prepare @@ -116,9 +95,6 @@ jobs: if [[ "${{ matrix.worker }}" == "docker"* ]]; then echo "TEST_DOCKERD=1" >> $GITHUB_ENV fi - if [ "${{ matrix.mode }}" = "experimental" ]; then - echo "TEST_BUILDX_EXPERIMENTAL=1" >> $GITHUB_ENV - fi - name: Checkout uses: actions/checkout@v4 diff --git a/commands/root.go b/commands/root.go index 654e89e4bff4..ca8cafb4a577 100644 --- a/commands/root.go +++ b/commands/root.go @@ -7,7 +7,6 @@ import ( historycmd "github.com/docker/buildx/commands/history" imagetoolscmd "github.com/docker/buildx/commands/imagetools" "github.com/docker/buildx/util/cobrautil/completion" - "github.com/docker/buildx/util/confutil" "github.com/docker/buildx/util/logutil" "github.com/docker/cli-docs-tool/annotation" "github.com/docker/cli/cli" @@ -84,10 +83,6 @@ func NewRootCmd(name string, isPlugin bool, dockerCli *command.DockerCli) *cobra "using default config store", )) - if !confutil.IsExperimental() { - cmd.SetHelpTemplate(cmd.HelpTemplate() + "\nExperimental commands and flags are hidden. Set BUILDX_EXPERIMENTAL=1 to show them.\n") - } - addCommands(cmd, &opt, dockerCli) return cmd } @@ -117,13 +112,13 @@ func addCommands(cmd *cobra.Command, opts *rootOptions, dockerCli command.Cli) { duCmd(dockerCli, opts), imagetoolscmd.RootCmd(cmd, dockerCli, imagetoolscmd.RootOptions{Builder: &opts.builder}), historycmd.RootCmd(cmd, dockerCli, historycmd.RootOptions{Builder: &opts.builder}), + + // experimental commands + debugCmd(dockerCli, opts), + dapCmd(dockerCli, opts), ) - if confutil.IsExperimental() { - cmd.AddCommand(debugCmd(dockerCli, opts)) - cmd.AddCommand(dapCmd(dockerCli, opts)) - } - cmd.RegisterFlagCompletionFunc( //nolint:errcheck + _ = cmd.RegisterFlagCompletionFunc( "builder", completion.BuilderNames(dockerCli), ) diff --git a/docker-bake.hcl b/docker-bake.hcl index 038e191bd382..b59612038d4c 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -91,7 +91,6 @@ target "validate-docs" { inherits = ["_common"] args = { FORMATS = DOCS_FORMATS - BUILDX_EXPERIMENTAL = 1 // enables experimental cmds/flags for docs generation } dockerfile = "./hack/dockerfiles/docs.Dockerfile" target = "validate" @@ -116,7 +115,6 @@ target "update-docs" { inherits = ["_common"] args = { FORMATS = DOCS_FORMATS - BUILDX_EXPERIMENTAL = 1 // enables experimental cmds/flags for docs generation } dockerfile = "./hack/dockerfiles/docs.Dockerfile" target = "update" diff --git a/docs/bake-reference.md b/docs/bake-reference.md index af8cddfc74a7..1bb396a8a48a 100644 --- a/docs/bake-reference.md +++ b/docs/bake-reference.md @@ -632,7 +632,7 @@ from both the `app-dev` and `_release` targets. target "app-dev" { args = { GO_VERSION = "1.20" - BUILDX_EXPERIMENTAL = 1 + ENABLE_DEBUG = 1 } tags = ["docker.io/username/myapp"] dockerfile = "app.Dockerfile" @@ -644,7 +644,7 @@ target "app-dev" { target "_release" { args = { BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1 - BUILDX_EXPERIMENTAL = 0 + ENABLE_DEBUG = 0 } } @@ -656,7 +656,7 @@ target "app-release" { When inheriting attributes from multiple targets and there's a conflict, the target that appears last in the `inherits` list takes precedence. -The previous example defines the `BUILDX_EXPERIMENTAL` argument twice for the `app-release` target. +The previous example defines the `ENABLE_DEBUG` argument twice for the `app-release` target. It resolves to `0` because the `_release` target appears last in the inheritance chain: ```console @@ -676,7 +676,7 @@ $ docker buildx bake --print app-release "dockerfile": "app.Dockerfile", "args": { "BUILDKIT_CONTEXT_KEEP_GIT_DIR": "1", - "BUILDX_EXPERIMENTAL": "0", + "ENABLE_DEBUG": "0", "GO_VERSION": "1.20" }, "labels": { diff --git a/docs/debugging.md b/docs/debugging.md index 8e3662f3fb46..12acef8f23ea 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -11,13 +11,6 @@ state of the build environment at any point. ## Starting the debugger -To start the debugger, first, ensure that `BUILDX_EXPERIMENTAL=1` is set in -your environment. - -```console -$ export BUILDX_EXPERIMENTAL=1 -``` - To start a debug session for a build, you can use the `buildx debug` command with `--invoke` flag to specify a command to launch in the resulting image. `buildx debug` command provides `buildx debug build` subcommand that provides the same features as the normal `buildx build` command but allows launching the debugger session after the build. diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index dd320cc8f114..5fc5cbf26255 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -54,9 +54,6 @@ Start a build -Flags marked with `[experimental]` need to be explicitly enabled by setting the -`BUILDX_EXPERIMENTAL=1` environment variable. - ## Description The `docker buildx build` command starts a build using BuildKit. diff --git a/hack/dockerfiles/docs.Dockerfile b/hack/dockerfiles/docs.Dockerfile index 13cfb028c82a..2a0a8e1af330 100644 --- a/hack/dockerfiles/docs.Dockerfile +++ b/hack/dockerfiles/docs.Dockerfile @@ -16,7 +16,6 @@ RUN apk add --no-cache rsync git WORKDIR /src COPY --from=docsgen /out/docsgen /usr/bin ARG FORMATS -ARG BUILDX_EXPERIMENTAL RUN --mount=target=/context \ --mount=target=.,type=tmpfs <