Improve deploy --cancel output#4669
Conversation
Make the deploy --cancel output more accurate and informative.
|
Example output: |
|
/cc @Kargakis |
pkg/cmd/cli/cmd/deploy.go
Outdated
There was a problem hiding this comment.
I would prefer moving formatRelativeTime probably under pkg/util/time or at least export it (we already import its package) and use that instead but you would have to change a couple of other places as well.
There was a problem hiding this comment.
Spoke with @Kargakis and we decided that there needs to be a separate PR to extract various things here into pkg/util.
There was a problem hiding this comment.
Not into util, into util/*/ :)
|
LGTM, just nits |
|
@smarterclayton should also take a look since he filed the original issue. |
pkg/cmd/cli/cmd/deploy.go
Outdated
There was a problem hiding this comment.
No deployment is in progress for deployment config foo (latest #3)
Or similar
There was a problem hiding this comment.
The difference in this particular case is there is no latest deployment. THere's nothing in progress, but there might be soon- we can't say for sure.
There was a problem hiding this comment.
Be more explicit. No deployments currently in progress for deployment
config foo (current #3)
On Tue, Sep 15, 2015 at 1:20 PM, Dan Mace notifications@github.com wrote:
In pkg/cmd/cli/cmd/deploy.go
#4669 (comment):@@ -317,7 +322,18 @@ func (o *DeployOptions) cancel(config *deployapi.DeploymentConfig, out io.Writer
return fmt.Errorf("couldn't cancel deployment %s", strings.Join(failedCancellations, ", "))
}
if !anyCancelled {
fmt.Fprintln(out, "no active deployments to cancel")if latest == nil {// TODO: this could mean that a new deployment is forthcoming but hasn't// yet been created; might not be worth trying to express in this// context.fmt.Fprintf(out, "no deployments are in progress\n")The difference in this particular case is there is no latest deployment.
THere's nothing in progress, but there might be soon- we can't say for sure.—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/4669/files#r39538283.
Clayton Coleman | Lead Engineer, OpenShift
There was a problem hiding this comment.
I think I got it right this time. Now it'll always show the latest deployment's status when there are >0 deployments.
|
Looks ok |
|
Feedback addressed. [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/5006/) (Image: devenv-fedora_2349) |
|
Evaluated for origin merge up to 6ef537c |
|
[Test]ing while waiting on the merge queue |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/5006/) |
|
Evaluated for origin test up to 6ef537c |
Merged by openshift-bot
Make the deploy --cancel output more accurate and informative.
Fixes #4642