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

add public API to detect node providers #2069

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

BenTheElder
Copy link
Member

see: #2067

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 13, 2021
@BenTheElder
Copy link
Member Author

Not having people re-implement this to fail out early when there doesn't seem to be a provider available will be more important in the future when we have detection for some provider that is not a mere "$cli_binary is in path", which we'll likely want to do at some point.

}
return p
}

// NoNodeProviderDetectedError indicates that we could not autolocate an available
// NodeProvider backend on the host
var NoNodeProviderDetectedError = errors.NewWithoutStack("failed to detect any supported node provider")
Copy link
Member Author

Choose a reason for hiding this comment

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

we haven't actually had much in the way of client-handle-able errors yet (usually stuff like "cluster bringup failed in some unexpected way"), so I had to update the error utilities to handle this appropriately.

// NewWithoutStack is like new but does NOT wrap with a stack
// This is useful for exported errors
func NewWithoutStack(message string) error {
return stderrors.New(message)
Copy link
Member Author

Choose a reason for hiding this comment

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

since this will necessarily be for making errors at the bottom of the stack that should not themselves contain a stack, this should be appropriate (a plain error with the message and nothing else).

@BenTheElder
Copy link
Member Author

installing podman is failing in the CI pipeline :|

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/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 13, 2021
@BenTheElder
Copy link
Member Author

hmm it seems to get github actions to run with the latest config you must manually rebase the PR.
that's ... not great.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 13, 2021
@aojea
Copy link
Contributor

aojea commented Feb 13, 2021

/retest
/lgtm

hmm it seems to get github actions to run with the latest config you must manually rebase the PR.
that's ... not great.

I´m sufferin gthis every day 🙃

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 13, 2021
@k8s-ci-robot k8s-ci-robot merged commit 9199e1c into kubernetes-sigs:master Feb 13, 2021
@BenTheElder BenTheElder deleted the provider-detect branch February 13, 2021 17:41
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/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.

4 participants