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 error code for cluster cleanup #2090

Merged
merged 2 commits into from
Mar 26, 2020

Conversation

timuthy
Copy link
Member

@timuthy timuthy commented Mar 24, 2020

What this PR does / why we need it:
This PR adds a new error code ERR_CLEANUP_CLUSTER_RESOURCES which indicates that resources in the shoot cluster are stuck in deletion.

This allows Gardener users to react accordingly, e.g. the Gardener-Dashboard can show this kind of error as an user related error.

Special notes for your reviewer:

  • Error wrapping feature of Golang 1.13 is used, see https://blog.golang.org/go1.13-errors.
  • If a resource of extensions.gardener.cloud already contains a known error code then this one is reused rather than re-matching the Regex. I see that we need a clear error code contract between Gardener and related extensions but don't want to introduce it in this PR. I'll create an issue and will implement it in further PRs.

Release note:

If a cluster is stuck in deletion because its content cannot be removed right away, the shoot resource will now contain the error code `ERR_CLEANUP_CLUSTER_RESOURCES` in `.status.lastErrors`

@rfranzke
Copy link
Member

cc @gardener/dashboard-maintainers

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

Looks good :) Just a very minor nit

pkg/apis/core/v1beta1/helper/errors.go Show resolved Hide resolved
@timuthy timuthy changed the title Feature.cleanup err code Add error code for cluster cleanup Mar 24, 2020
rfranzke
rfranzke previously approved these changes Mar 25, 2020
timebertt
timebertt previously approved these changes Mar 25, 2020
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

/lgtm

pkg/apis/core/v1beta1/helper/errors_test.go Outdated Show resolved Hide resolved
@rfranzke rfranzke requested a review from timebertt March 26, 2020 05:26
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Thanks, /approve

@timuthy timuthy merged commit b8a8983 into gardener:master Mar 26, 2020
@timuthy timuthy deleted the feature.cleanup-err-code branch March 26, 2020 06:55
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.

None yet

5 participants