Skip to content

builder: add config var for setting context streaming default - #245

Closed
tonistiigi wants to merge 1 commit into
docker:masterfrom
tonistiigi:stream-config
Closed

builder: add config var for setting context streaming default#245
tonistiigi wants to merge 1 commit into
docker:masterfrom
tonistiigi:stream-config

Conversation

@tonistiigi

Copy link
Copy Markdown
Member

@tiborvass@thaJeztah

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

@codecov-io

codecov-io commented Jun 27, 2017

Copy link
Copy Markdown

Codecov Report

Merging #245 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@ Coverage Diff @@## master #245 +/- ##
==========================================
- Coverage 48.34% 48.32% -0.03% 
==========================================
Files 172 172 Lines 11710 11715 +5 ==========================================
Hits 5661 5661 - Misses 5691 5696 +5 
Partials 358 358

Comment threadcli/command/image/build.go Outdated
if v := dockerCli.ConfigFile().BuildStreamContext; v != nil {
options.stream = *v
}
}

@dnephindnephinJun 29, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we move this to a new function ?

funcsetDefaultsFromConfig(dockerCli command.Cli, flags*pflag.FlatSet, options*buildOptions) {
...
}

That will make it easy to unit test.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

You mean setDefaultsFromConfig(dockerCli command.Cli, flags *pflag.FlatSet, options *buildOptions) ? Need a pointer of the options to change it. What is the bool return supposed to mean? Also, this wouldn't work because this check needs DockerCli not Cli to check if session is supported.

@dnephindnephinJun 29, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, I forgot to remove the bool return (fixed now), and it would need to be a pointer.

It shouldn't need DockerCli. I fixed Cli to include ServerInfo in #233.

NodesFormat string `json:"nodesFormat,omitempty"`
PruneFilters []string `json:"pruneFilters,omitempty"`
Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
BuildStreamContext *bool `json:"buildStreamContext,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@thaJeztah buildStreamContext or streamBuildContext?

@dnephindnephinJun 29, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess most of these start with the object name (service, images, etc). but buildStreamContext doesn't read too well.

How about buildAlwaysStreamContext (or buildDefaultStreamContext) ? That way it's a little more clear what this is enabling.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Argh. naming. hm

Do we have other contexts other than for build? For booleans, I always liked, e.g. enableSomething (EnableContextStreaming e.g.), but that may be a bit too verbose

Do we expect more build-related options? If so, possibly have a build key, containing stream-context (in the JSON)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd be good with a build key.

I don't think Enable is right, it's not enabling a feature, it's just changing the default.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@vieux

vieux commented Jul 11, 2017

Copy link
Copy Markdown
Contributor

what are the possible values ? any doc on the subject ?

@vdemeester

Copy link
Copy Markdown
Collaborator

@thaJeztah@tonistiigi@dnephin what is the status here (should we close for now) ?

@tiborvass

Copy link
Copy Markdown
Collaborator

Nope

nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
[17.09] back port Close pipe if mountFrom failed.
Sign up for freeto 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.

8 participants

@tonistiigi@codecov-io@vieux@vdemeester@tiborvass@dnephin@thaJeztah@GordonTheTurtle