Skip to content

Emit event when cancelling a deployment #10590

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

Merged
merged 1 commit into from
Aug 24, 2016

Conversation

mfojtik
Copy link
Contributor

@mfojtik mfojtik commented Aug 23, 2016

A simple addition that allow to see the cancelled deployments in events (oc describe/console):

DeploymentCreated   Created new deployment "ruby-ex-8" for version 8
DeploymentCancelled ruby-ex-8: deployment "test/ruby-ex-8" cancelled
DeploymentCreated   Created new deployment "ruby-ex-9" for version 9

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 23, 2016

@Kargakis ptal

@@ -185,6 +185,7 @@ func (c *DeploymentController) Handle(deployment *kapi.ReplicationController) er
if err := c.cleanupDeployerPods(deployment); err != nil {
return err
}
c.emitDeploymentEvent(deployment, kapi.EventTypeNormal, "DeploymentCancelled", fmt.Sprintf("deployment %q cancelled", deployutil.LabelForDeployment(deployment)))
Copy link
Contributor

Choose a reason for hiding this comment

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

"Deployment... "

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ruby-ex-8: Deployment "test/ruby-ex-8" cancelled seems weird :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(but I don't care enough to keep it, so I will fix it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I thought "deployment" was the first word in the event. :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Nvmd, ok for now

@0xmichalis
Copy link
Contributor

One comment, lgtm otherwise

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 24, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 24, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8390/) (Image: devenv-rhel7_4918)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to c374c50

@openshift-bot openshift-bot merged commit dcacce6 into openshift:master Aug 24, 2016
@mfojtik mfojtik deleted the cancel-events branch September 5, 2018 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants