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

Improve error handling for "no match found" errors #530

Merged
merged 6 commits into from
Apr 11, 2019

Conversation

lblackstone
Copy link
Member

@lblackstone lblackstone commented Apr 10, 2019

For k8s to work with CustomResources, the corresponding CustomResourceDefinition
must be registered with the API server. In cases where the CRD does not exist, add
special handling rather than failing with an error. The relevant cases are:

  1. Create/Update - Fail with a descriptive error after retrying
  2. Read/Delete - Consider the CR to be deleted if the CRD is missing

Fixes #526

For k8s to work with CustomResources, the corresponding CustomResourceDefinition
must be registered with the API server. In cases where the CRD does not exist, add
special handling rather than failing with an error. The relevant cases are:

1. Create - Fail with a descriptive error after retrying
2. Read/Update/Delete - Consider the CR to be deleted if the CRD is missing
@lblackstone lblackstone marked this pull request as ready for review April 10, 2019 20:45
Copy link
Contributor

@hausdorff hausdorff left a comment

Choose a reason for hiding this comment

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

Couple of suggestions, but overall good.

I've filed #531 as a follow-up. That test where we're deleting the CRDs and leaving the CRs around in the app is very strange, but it's ok to be in a test.

pkg/await/await.go Outdated Show resolved Hide resolved
pkg/provider/provider.go Outdated Show resolved Hide resolved
tests/integration/crds/step2/index.ts Show resolved Hide resolved
@lblackstone lblackstone merged commit d5fcfe0 into master Apr 11, 2019
@pulumi-bot pulumi-bot deleted the lblackstone/crd-error-handling branch April 11, 2019 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants