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

Tolerate partial API discovery #36

Conversation

rfranzke
Copy link
Contributor

@rfranzke rfranzke commented May 27, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
The API discovery is now tolerating a partial discovery failure, e.g. caused due to unavailable API groups.

Which issue(s) this PR fixes:
Fixes #35

Special notes for your reviewer:
I added a unit test that simulates the behaviour and tested it successfully in a real-world scenario. If you like you can use rfranzke/cpvpa-amd64:v0.8.2-1-g5754e13 Docker image for testing.

Does this PR introduce a user-facing change?:

The `cluster-proportional-vertical-autoscaler` is no longer crashing if it cannot fully discover the API. Instead, it tolerates a partial discovery as long as its relevant API groups are discoverable.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 27, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @rfranzke!

It looks like this is your first PR to kubernetes-sigs/cluster-proportional-vertical-autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-proportional-vertical-autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 27, 2020
@rfranzke
Copy link
Contributor Author

/assign @MrHohn @ialidzhikov

@k8s-ci-robot
Copy link
Contributor

@rfranzke: GitHub didn't allow me to assign the following users: ialidzhikov.

Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @MrHohn @ialidzhikov

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.

Copy link
Member

@MrHohn MrHohn left a comment

Choose a reason for hiding this comment

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

Thanks! This is cleaner than I originally thought, LGTM with minor comments.
/approve

pkg/autoscaler/k8sclient/k8sclient.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrHohn, rfranzke

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 27, 2020
@rfranzke rfranzke force-pushed the fix/tolerate-partial-api-discovery branch from 5754e13 to 260b752 Compare May 28, 2020 04:31
@MrHohn
Copy link
Member

MrHohn commented May 28, 2020

Thanks!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2020
@k8s-ci-robot k8s-ci-robot merged commit b272267 into kubernetes-sigs:master May 28, 2020
@rfranzke rfranzke deleted the fix/tolerate-partial-api-discovery branch May 28, 2020 17:11
@rfranzke
Copy link
Contributor Author

Great! Thanks for merging! It would be nice if you could release a new version with this fix :)

@MrHohn MrHohn mentioned this pull request May 28, 2020
@MrHohn
Copy link
Member

MrHohn commented May 28, 2020

Yep, will try to publish a new release this week. Opened #37 for that.

@rfranzke
Copy link
Contributor Author

Thank you @MrHohn!

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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", 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.

CPVPA fails if some API is not discoverable
3 participants