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

Avoid throwing error when controller kind is unknown #3598

Merged
merged 2 commits into from
Feb 28, 2019
Merged

Avoid throwing error when controller kind is unknown #3598

merged 2 commits into from
Feb 28, 2019

Conversation

maciaszczykm
Copy link
Member

Fixes #3251.

@maciaszczykm maciaszczykm self-assigned this Feb 21, 2019
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 21, 2019
@k8s-ci-robot k8s-ci-robot requested review from mhenc and rf232 February 21, 2019 13:58
@maciaszczykm maciaszczykm requested a review from jeefy February 26, 2019 08:32
Copy link
Member

@jeefy jeefy left a comment

Choose a reason for hiding this comment

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

PTAL, I think you just have to address the change in function definition in the test. I'll take another look once that's addressed 😄

@@ -46,7 +46,7 @@ type PodDetail struct {
NodeName string `json:"nodeName"`
RestartCount int32 `json:"restartCount"`
QOSClass string `json:"qosClass"`
Controller controller.ResourceOwner `json:"controller"`
Controller *controller.ResourceOwner `json:"controller,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

I think this is breaking the tests in detail_test.go

See https://travis-ci.org/kubernetes/dashboard/jobs/496515775#L364

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, didn't check it before. Thanks :)

@maciaszczykm
Copy link
Member Author

@jeefy PTAL

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #3598 into master will decrease coverage by 0.39%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #3598     +/-   ##
=========================================
- Coverage   48.42%   48.02%   -0.4%     
=========================================
  Files         165      165             
  Lines        8000     7960     -40     
  Branches       24       24             
=========================================
- Hits         3874     3823     -51     
- Misses       3858     3882     +24     
+ Partials      268      255     -13
Impacted Files Coverage Δ
src/app/backend/resource/controller/controller.go 20.27% <0%> (ø) ⬆️
src/app/backend/resource/pod/detail.go 56.47% <80%> (+0.22%) ⬆️
src/app/backend/resource/cronjob/jobs.go 35.82% <0%> (-33.33%) ⬇️
...p/backend/integration/metric/common/aggregation.go 89.09% <0%> (-1.82%) ⬇️
src/app/backend/handler/apihandler.go 27.19% <0%> (-0.04%) ⬇️
src/app/backend/resource/cronjob/detail.go 81.81% <0%> (+11.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 997a0af...f6a4fc0. Read the comment docs.

@floreks
Copy link
Member

floreks commented Feb 28, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks, maciaszczykm

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [floreks,maciaszczykm]

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

@k8s-ci-robot k8s-ci-robot merged commit cb4129a into kubernetes:master Feb 28, 2019
@maciaszczykm maciaszczykm deleted the fix-controller-method branch February 28, 2019 09:33
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants