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 format in VolumeSnapshotError #970

Closed
hairyhum opened this issue Dec 1, 2023 · 5 comments
Closed

Improve error format in VolumeSnapshotError #970

hairyhum opened this issue Dec 1, 2023 · 5 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@hairyhum
Copy link

hairyhum commented Dec 1, 2023

Is your feature request related to a problem?/Why is this needed

In kanister controller https://github.com/kanisterio/kanister when creating volume snapshots we monitor its status to detect whether it's ready or failed.
When extracting the error from VolumeSnapshotError.Message it's just a string, usually composed with multiple layers of error strings.
We'd like to be able to distinguish between different types of errors (e.g. recoverable and non-recoverable), but currently all we can do is to match the error text.

Describe the solution you'd like in detail

The type of VolumeSnapshotError can be extended to include something like error type or code.
For example:

type VolumeSnapshotError struct {
	Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
	// Add code from the limited set
	ErrorCode *int64 `json:"errorCode,omitempty" protobuf:"bytes,3,opt,name=errorCode"`
	// OR:
	// Add type from limited set
	ErrorType *string `json:"errorType,omitempty" protobuf:"bytes,3,opt,name=errorType"`
	// Message can still be there
	Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
}

Alternatively formatting of error message in VolumeSnapshotError.Message can be changed to include error type while keeping it a string.

Describe alternatives you've considered

Currently alternative is to match on error string, which is harder to maintain because text could be changed.

Additional context

@hairyhum
Copy link
Author

hairyhum commented Dec 4, 2023

Another option is to record reason from updateSnapshotErrorStatusWithEvent function there.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 3, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 2, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants