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

builder: remove legacy build's session handling #39983

Merged
merged 1 commit into from
Oct 3, 2019

Conversation

tiborvass
Copy link
Contributor

@tiborvass tiborvass commented Sep 24, 2019

This feature was used by docker build --stream and it was kept experimental.

Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.

Signed-off-by: Tibor Vass tibor@docker.com

Related: docker/cli#2105

$ dockerd --experimental &> logs &
$ DOCKER_CLI_EXPERIMENTAL=enabled DOCKER_BUILDKIT=0 docker build --stream .
Error response from daemon: experimental session with v1 builder is no longer supported, use builder version v2 (BuildKit) instead

(for easier discovery of this change); this removes the experimental (non-buildkit) daemon changes related to #31829, #32677, #33786, #33859, docker/cli#231, docker/cli#678

@AkihiroSuda
Copy link
Member

needs to error out if an old client requested --stream?

@tiborvass
Copy link
Contributor Author

@AkihiroSuda Updated with a message that can be improved. I'm waiting on CLI to be merged first before marking this one ready to review.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment inline, but there's probably more to remove; I'll leave a comment below

return nil, err
} else if src != nil {
source = src
if config.Options.SessionID != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move this check to the API, and either remove or deprecate the SessionID field;

SessionID string

Looks like this field is set in a couple of places in the API, so perhaps we can catch it there;

options.SessionID = r.FormValue("session")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's debatable where in the code to put the error. If I put it in the API and remove it from the builder package, then whoever uses the builder package will not have an error when they should. I don't mind that the HTTP handler code doesn't error out and leaves it to the builder package to error out. Also, as you realized later, the SessionID field is still needed for BuildKit, so I'm not planning to remove or deprecate that field.

@thaJeztah
Copy link
Member

So, after some looking, I think he only changes needed would be my suggestion above (removing/deprecating the SessionID field), as BuildKit uses the same /session endpoint, so just the experimental use of that endpoint is removed.

@tiborvass I assume that the client/session code (e.g. changes made in #33859) is still used by BuildKit?

(I did notice the docs needed some updating, so opened a PR for that; #40028)

@tiborvass
Copy link
Contributor Author

tiborvass commented Oct 2, 2019

@thaJeztah the client/session package from #33859 is now in the buildkit repo. Thanks for the docs PR!

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member

CI failed on docker-py, which is broken, but will be fixed by #40030

We'll probably need to rebase this once that's merged, to get CI green

This feature was used by docker build --stream and it was kept experimental.

Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.

Signed-off-by: Tibor Vass <tibor@docker.com>
@tiborvass
Copy link
Contributor Author

Rebased

@thaJeztah
Copy link
Member

Let's wait for @tonistiigi to have a look; moved back to code-review,

@tiborvass tiborvass merged commit 3c54825 into moby:master Oct 3, 2019
@thaJeztah
Copy link
Member

Looks like this broke master (vendor check), see #40032 (comment), and #40037

I was wondering how, but I think I understand;

[2019-10-02T20:48:17.877Z] + docker run --rm -t --privileged -v /home/ubuntu/workspace/moby_PR-39983/.git:/go/src/github.com/docker/docker/.git --name docker-pr4 -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT=6ca3ec88ae9e1435abbed665ec598c00058659da -e DOCKER_GRAPHDRIVER docker:6ca3ec88ae9e1435abbed665ec598c00058659da hack/validate/vendor
[2019-10-02T20:48:18.810Z] No vendor changes in diff.

The vendor check only runs if vendor.conf is modified, but in this case the import was removed, therefore also affecting what has to be vendored

@tiborvass
Copy link
Contributor Author

@thaJeztah thanks, opening up a fix.

@tiborvass
Copy link
Contributor Author

Nevermind, you're faster #40037

thaJeztah added a commit to thaJeztah/cli that referenced this pull request Oct 25, 2019
full diff: moby/moby@b6684a4...a30990b

relevant changes:

- moby/moby#39995 Update containerd binary to v1.2.10
- moby/moby#40001 Update runc to v1.0.0-rc8-92-g84373aaa (CVE-2019-16884)
- moby/moby#39999 bump golang 1.13.1 (CVE-2019-16276)
- moby/moby#40102 bump golang 1.13.3 (CVE-2019-17596)
- moby/moby#39994 homedir: add cgo or osusergo buildtag constraints for unix.
  This is to ensure that users of the homedir package cannot compile statically
  (`CGO_ENABLED=0`) without also setting the `osusergo` build tag.
- moby/moby#39983 builder: remove legacy build's session handling
  This feature was used by docker build --stream and it was kept experimental.
  Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.
    - Related: docker#2105 build: remove --stream (was experimental)
- moby/moby #40045 Bump logrus 1.4.2, go-shellwords, mergo, flock, creack/pty,
  golang/gddo, gorilla/mux
- moby/moby#39713 bump containerd and dependencies to v1.3.0
- moby/moby#39987 Add ability to handle index acknowledgment with splunk log driver
- moby/moby#40070 Use ocischema package instead of custom handler
    - relates to moby/moby#39727 Docker 19.03 doesn't support OCI image
    - relates to docker/hub-feedback#1871
    - relates to distribution/distribution#3024
- moby/moby#39231 Add support for sending down service Running and Desired task counts
- moby/moby#39822 daemon: Use short libnetwork ID in exec-root

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Oct 26, 2019
full diff: moby/moby@b6684a4...a09e6e3

relevant changes:

- moby/moby#39995 Update containerd binary to v1.2.10
- moby/moby#40001 Update runc to v1.0.0-rc8-92-g84373aaa (CVE-2019-16884)
- moby/moby#39999 bump golang 1.13.1 (CVE-2019-16276)
- moby/moby#40102 bump golang 1.13.3 (CVE-2019-17596)
- moby/moby#40134 Revert "homedir: add cgo or osusergo buildtag constraints for unix"
    - reverts moby/moby#39994 homedir: add cgo or osusergo buildtag constraints for unix,
      in favor of documenting when to set the `osusergo` build tag. The `osusergo`
      build-flag must be used when compiling a static binary with `cgo` enabled,
      and linking against `glibc`.
- moby/moby#39983 builder: remove legacy build's session handling
  This feature was used by docker build --stream and it was kept experimental.
  Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.
    - Related: docker#2105 build: remove --stream (was experimental)
- moby/moby #40045 Bump logrus 1.4.2, go-shellwords, mergo, flock, creack/pty,
  golang/gddo, gorilla/mux
- moby/moby#39713 bump containerd and dependencies to v1.3.0
- moby/moby#39987 Add ability to handle index acknowledgment with splunk log driver
- moby/moby#40070 Use ocischema package instead of custom handler
    - relates to moby/moby#39727 Docker 19.03 doesn't support OCI image
    - relates to docker/hub-feedback#1871
    - relates to distribution/distribution#3024
- moby/moby#39231 Add support for sending down service Running and Desired task counts
- moby/moby#39822 daemon: Use short libnetwork ID in exec-root
- moby/moby#39100 Use Microsoft/hcsshim constants and deprecate pkg/system.GetOsVersion()
    - updates/requires Microsoft/hscshim@2226e083fc390003ae5aa8325c3c92789afa0e7a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Oct 26, 2019
full diff: moby/moby@b6684a4...a09e6e3

relevant changes:

- moby/moby#39995 Update containerd binary to v1.2.10
- moby/moby#40001 Update runc to v1.0.0-rc8-92-g84373aaa (CVE-2019-16884)
- moby/moby#39999 bump golang 1.13.1 (CVE-2019-16276)
- moby/moby#40102 bump golang 1.13.3 (CVE-2019-17596)
- moby/moby#40134 Revert "homedir: add cgo or osusergo buildtag constraints for unix"
    - reverts moby/moby#39994 homedir: add cgo or osusergo buildtag constraints for unix,
      in favor of documenting when to set the `osusergo` build tag. The `osusergo`
      build-flag must be used when compiling a static binary with `cgo` enabled,
      and linking against `glibc`.
- moby/moby#39983 builder: remove legacy build's session handling
  This feature was used by docker build --stream and it was kept experimental.
  Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.
    - Related: docker#2105 build: remove --stream (was experimental)
- moby/moby #40045 Bump logrus 1.4.2, go-shellwords, mergo, flock, creack/pty,
  golang/gddo, gorilla/mux
- moby/moby#39713 bump containerd and dependencies to v1.3.0
- moby/moby#39987 Add ability to handle index acknowledgment with splunk log driver
- moby/moby#40070 Use ocischema package instead of custom handler
    - relates to moby/moby#39727 Docker 19.03 doesn't support OCI image
    - relates to docker/hub-feedback#1871
    - relates to distribution/distribution#3024
- moby/moby#39231 Add support for sending down service Running and Desired task counts
- moby/moby#39822 daemon: Use short libnetwork ID in exec-root
- moby/moby#39100 Use Microsoft/hcsshim constants and deprecate pkg/system.GetOsVersion()
    - updates/requires Microsoft/hscshim@2226e083fc390003ae5aa8325c3c92789afa0e7a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Oct 28, 2019
full diff: moby/moby@b6684a4...a09e6e3

relevant changes:

- moby/moby#39995 Update containerd binary to v1.2.10
- moby/moby#40001 Update runc to v1.0.0-rc8-92-g84373aaa (CVE-2019-16884)
- moby/moby#39999 bump golang 1.13.1 (CVE-2019-16276)
- moby/moby#40102 bump golang 1.13.3 (CVE-2019-17596)
- moby/moby#40134 Revert "homedir: add cgo or osusergo buildtag constraints for unix"
    - reverts moby/moby#39994 homedir: add cgo or osusergo buildtag constraints for unix,
      in favor of documenting when to set the `osusergo` build tag. The `osusergo`
      build-flag must be used when compiling a static binary with `cgo` enabled,
      and linking against `glibc`.
- moby/moby#39983 builder: remove legacy build's session handling
  This feature was used by docker build --stream and it was kept experimental.
  Users of this endpoint should enable BuildKit anyway by setting Version to BuilderBuildKit.
    - Related: #2105 build: remove --stream (was experimental)
- moby/moby #40045 Bump logrus 1.4.2, go-shellwords, mergo, flock, creack/pty,
  golang/gddo, gorilla/mux
- moby/moby#39713 bump containerd and dependencies to v1.3.0
- moby/moby#39987 Add ability to handle index acknowledgment with splunk log driver
- moby/moby#40070 Use ocischema package instead of custom handler
    - relates to moby/moby#39727 Docker 19.03 doesn't support OCI image
    - relates to docker/hub-feedback#1871
    - relates to distribution/distribution#3024
- moby/moby#39231 Add support for sending down service Running and Desired task counts
- moby/moby#39822 daemon: Use short libnetwork ID in exec-root
- moby/moby#39100 Use Microsoft/hcsshim constants and deprecate pkg/system.GetOsVersion()
    - updates/requires Microsoft/hscshim@2226e083fc390003ae5aa8325c3c92789afa0e7a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7f6cd64335dc631efaa8204c01f92aa40939073a
Component: cli
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants