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

Remove experimental from service logs #32462

Merged
merged 1 commit into from Apr 11, 2017

Conversation

@dperny
Copy link
Contributor

commented Apr 10, 2017

Signed-off-by: Drew Erny drew.erny@docker.com

- What I did
Remove experimental flag from service logs. API is now stable. Service logs now support all features, except retrieving details provided to the log driver.

- How I did it
Removed the experimental-specific code, updated the tests

- How to verify it
Tests pass

- Description for the changelog

Added ability to get logs from services and tasks, which was previously experimental.

@vdemeester
Copy link
Member

left a comment

LGTM 🦁

@@ -49,13 +49,14 @@ func newLogsCommand(dockerCli *command.DockerCli) *cobra.Command {
opts.target = args[0]
return runLogs(dockerCli, &opts)
},
Tags: map[string]string{"experimental": ""},

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

Ok, thinking what we should put here (bear with me, as this is still "new");

When talking to an older daemon, it should only be able to use this command if "experimental" is enabled. I guess that's handled by the daemon just returning a 404 if it's not enabled

However, it "officially" became a feature in docker 17.05 now, so should this be, like this?

Tags:  map[string]string{"version": "1.29"},

Thinking of new clients talking to older daemons. It's tricky, because it's still possible that we're talking to an older daemon with experimental features enabled 😓

ping @vieux wdyt?

This comment has been minimized.

Copy link
@dperny

dperny Apr 10, 2017

Author Contributor

Right now, if a current client talks to an older daemon with experimental enabled, the API is relatively unchanged, so the behavior might not be what you're expecting, but it will probably work.

This comment has been minimized.

Copy link
@dperny

dperny Apr 10, 2017

Author Contributor

And by unexpected behavior, I might flags might not work or might be ignored, but there should not be panics.

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

Actually, just recalled that I opened an issue for (roughly) this #28655. If we agree on that one, it should probably be blocked for older versions

This comment has been minimized.

Copy link
@dperny

dperny Apr 10, 2017

Author Contributor

Fixed

@thaJeztah thaJeztah added this to the 17.05.0 milestone Apr 10, 2017

@thaJeztah thaJeztah requested a review from vieux Apr 10, 2017

@dperny dperny force-pushed the dperny:service-logs-general-availability branch from 86f6c66 to 90ed9ff Apr 10, 2017

@dperny

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2017

Added requirement of API version 1.29 to avoid using endpoints on an experimental daemon.

@dnephin
Copy link
Member

left a comment

LGTM

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Apr 10, 2017

Don't merge yet; @dperny is doing some docs changes and a minor textual change for the Usage

@dperny dperny force-pushed the dperny:service-logs-general-availability branch from 90ed9ff to f30e95e Apr 10, 2017

@thaJeztah
Copy link
Member

left a comment

minor nits, but LGTM otherwise


Options:
--details Show extra details provided to logs
--no-resolve Do not map IDs to Names in output
--no-truc Do not truncate output

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

s/--no-truc/--no-trunc/ 😄

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

also needs to be swapped with --no-task-id's (alphabetical)

-t, --timestamps Show timestamps
--tail string Number of lines to show from the end of the logs (default "all")

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

same here; --tail comes before --timestamps in output

Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>

@dperny dperny force-pushed the dperny:service-logs-general-availability branch from f30e95e to 306cfec Apr 10, 2017

@dperny

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2017

@thaJeztah alphabetized

@thaJeztah
Copy link
Member

left a comment

LGTM

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Apr 10, 2017

alphabet-street

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Apr 10, 2017

@@ -17,14 +16,16 @@ advisory: "experimental"
# service logs

```Markdown
Usage: docker service logs [OPTIONS] SERVICE
Usage: docker service logs [OPTIONS] SERVICE|TASK

This comment has been minimized.

Copy link
@albers

albers Apr 10, 2017

Member

Hmmm, so for bash completion I will need a list of all tasks. ATM, this can be done with

docker service ps ""

Is this supported syntax, will this continue to work?

This comment has been minimized.

Copy link
@thaJeztah

thaJeztah Apr 10, 2017

Member

Good question, looks like a "tricky" one

This comment has been minimized.

Copy link
@vieux

vieux Apr 10, 2017

Collaborator

interesting /cc @aluzzardi

@dperny

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2017

Windows timed out. z appears to have successfully PASSed all of the tests and then decided to FAIL anyway.

@vieux vieux merged commit 17a3e45 into moby:master Apr 11, 2017

4 of 6 checks passed

windowsRS1 Jenkins build Docker-PRs-WoW-RS1 12526 has failed
Details
z Jenkins build Docker-PRs-s390x 1426 has failed
Details
dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 32788 has succeeded
Details
janky Jenkins build Docker-PRs 41398 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 1586 has succeeded
Details
dnephin pushed a commit to dnephin/docker that referenced this pull request Apr 17, 2017
Merge pull request moby#32462 from dperny/service-logs-general-availa…
…bility

Remove experimental from service logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.