Skip to content

Fix ProgressDeadlineExceeded handling. - #1166

Merged
google-prow-robot merged 1 commit into
knative:masterfrom
mattmoor:fix-pde
Jun 12, 2018
Merged

google-prow-robot merged 1 commit into
knative:masterfrom
mattmoor:fix-pde

Conversation

@mattmoor

Copy link
Copy Markdown
Contributor

The manner in which we were looking up the controlling Revision on Deployment events was relying on (an incorrect) naming convention where deployment.Name == revision.Name. In reality, deployment.Name == revision.Name + "-deployment", but relying on this for looking up the controlling object is an antipattern.

Instead, we should utilize metav1.GetControllerOf to determine the controlling OwnerReference and use this name to lookup the owning `Revision.

This fixes the local issue, but I've opened #1165 to track a broader triage of this.

Progress toward: #1150

@google-prow-robot google-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 12, 2018
@mattmoor

Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-go-coverage

@knative-metrics-robot

Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/controller/revision/revision.go 73.6% 76.6% 3.1
pkg/controller/revision/revision_test.go 73.6% 76.6% 3.1

*TestCoverage feature is being tested, do not rely on any info here yet

@knative-metrics-robot

Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/controller/revision/revision.go 74.3% 76.8% 2.5
pkg/controller/revision/revision_test.go 74.3% 76.8% 2.5

*TestCoverage feature is being tested, do not rely on any info here yet

@evankanderson

Copy link
Copy Markdown
Member

/assign evankanderson

I'm assuming that we're already properly setting the owner references to enable GetControllerOf? Since the test is passing, I'm assuming that's true in general, and not just in the test.

/approve
/lgtm

Is it worth putting this in a doc somewhere and/or publicizing it somehow?

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2018
@google-prow-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, 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

@evankanderson

Copy link
Copy Markdown
Member

/retest

The manner in which we were looking up the controlling Revision on Deployment events was relying on (an incorrect) naming convention where `deployment.Name == revision.Name`.  In reality, `deployment.Name == revision.Name + "-deployment"`, but relying on this for looking up the controlling object is an antipattern.

Instead, we should utilize `metav1.GetControllerOf` to determine the controlling `OwnerReference` and use this name to lookup the owning `Revision.

This fixes the local issue, but I've opened #1165 to track a broader triage of this.

Progress toward: knative/serving#1150
@google-prow-robot google-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2018
@evankanderson

Copy link
Copy Markdown
Member

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2018
@knative-metrics-robot

Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/controller/revision/revision.go 77.9% 80.4% 2.5
pkg/controller/revision/revision_test.go 77.9% 80.4% 2.5

*TestCoverage feature is being tested, do not rely on any info here yet

1 similar comment
@knative-metrics-robot

Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/controller/revision/revision.go 77.9% 80.4% 2.5
pkg/controller/revision/revision_test.go 77.9% 80.4% 2.5

*TestCoverage feature is being tested, do not rely on any info here yet

@google-prow-robot
google-prow-robot merged commit 2db87a9 into knative:master Jun 12, 2018
@mattmoor
mattmoor deleted the fix-pde branch June 12, 2018 21:39
creydr pushed a commit to creydr/knative-serving that referenced this pull request Mar 25, 2025
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants