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: add config var for setting context streaming default #245

Closed
wants to merge 1 commit into from

Conversation

tonistiigi
Copy link
Member

@tiborvass @thaJeztah

Signed-off-by: Tonis Tiigi [email protected]

@codecov-io
Copy link

codecov-io commented Jun 27, 2017

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

if v := dockerCli.ConfigFile().BuildStreamContext; v != nil {
options.stream = *v
}
}
Copy link
Contributor

@dnephin dnephin Jun 29, 2017

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 ?

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

That will make it easy to unit test.

Copy link
Member Author

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.

Copy link
Contributor

@dnephin dnephin Jun 29, 2017

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.

@@ -43,6 +43,7 @@ type ConfigFile struct {
NodesFormat string `json:"nodesFormat,omitempty"`
PruneFilters []string `json:"pruneFilters,omitempty"`
Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
BuildStreamContext *bool `json:"buildStreamContext,omitempty"`
Copy link
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?

Copy link
Contributor

@dnephin dnephin Jun 29, 2017

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

@vieux
Copy link
Contributor

vieux commented Jul 11, 2017

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

@vdemeester
Copy link
Collaborator

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

@vdemeester vdemeester closed this Feb 16, 2018
@vdemeester vdemeester reopened this Feb 16, 2018
@tiborvass
Copy link
Collaborator

Nope

@tiborvass tiborvass closed this Mar 21, 2019
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.

8 participants