Skip to content

More events!#2438

Merged
knative-prow-robot merged 4 commits intoknative:masterfrom
jonjohnsonjr:stevents
Nov 9, 2018
Merged

More events!#2438
knative-prow-robot merged 4 commits intoknative:masterfrom
jonjohnsonjr:stevents

Conversation

@jonjohnsonjr
Copy link
Copy Markdown
Contributor

@jonjohnsonjr jonjohnsonjr commented Nov 8, 2018

  • Add Route/Config creation events to Service.
  • Make updateStatus implementations consistent, which makes them emit events on failure.

Fixes #1133

For Config and Route creation.
These had two different implementation styles, one of which emitted
events. Changed all of them to share the same style.
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 8, 2018
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@jonjohnsonjr: 0 warnings.

Details

In response to this:

  • Add Route/Config creation events to Service.
  • Make updateStatus implementations consistent, which makes them emit events. (We might not want this...)

Fixes #1133

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jonjohnsonjr
Copy link
Copy Markdown
Contributor Author

/assign @mattmoor

return nil, err
}

c.Recorder.Eventf(desired, corev1.EventTypeNormal, "Updated", "Updated status for KPA %q", desired.Name)
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.

I'm not convinced of the usefulness of this event... In some cases we update status a fair amount before we're done, which will mean a lot of events.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For KPA specifically or for our CRDs in general?

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'm also concerned that we may get flooded by unrelated events.
But on the other hand, I feel it acceptable to add first, and do subtraction later if we indeed find annoying events later.

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.

Generally I don't find it useful to surface an event that just says: "I updated status!" without what that update is.

I feel like this could be made useful by surfacing events reflecting changes in our conditions (vs. existing), especially with #2436 giving a hit for the level of event we should be surfacing (on False).

I'd exclude this from all resource types for now, and we can open an issue (for followup) that takes:
(r Recorder, obj runtime.Object, before duckv1alpha1.Conditions, after duckv1alpha1.Conditions) -> error

We should be able to take a generic delta of the Conditions and surface events through the Recorder for transitions.

A route test was expecting a status update event.
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/autoscaling/autoscaling.go 84.6% 84.8% 0.2
pkg/reconciler/v1alpha1/clusteringress/clusteringress.go 71.4% 71.2% -0.2
pkg/reconciler/v1alpha1/configuration/configuration.go 90.0% 90.1% 0.1
pkg/reconciler/v1alpha1/revision/revision.go 92.2% 92.2% 0.1
pkg/reconciler/v1alpha1/route/reconcile_resources.go 89.8% 89.4% -0.4
pkg/reconciler/v1alpha1/service/service.go 91.0% 91.2% 0.2

Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2018
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonjohnsonjr, mattmoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2018
@knative-prow-robot knative-prow-robot merged commit 2a6f37c into knative:master Nov 9, 2018
@jonjohnsonjr jonjohnsonjr deleted the stevents branch August 8, 2019 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants