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

Delete Namespace: clean up errors #7029

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Dec 21, 2024

What changed?

Clean up errors in delete namespace workflows:

  1. Use FailedPrecondition instead of InvalidArgument where it makes more sense.
  2. Add helpers to construct ApplicationErrors of different type.
  3. Remove unable to execute activity error which was wrongly used in many places.
  4. Few minor cleanups.

Why?

Simplify and unify error handling in delete namespace workflows.

How did you test it?

Modified tests. Manual runs.

Potential risks

No risks.

Documentation

No.

Is hotfix candidate?

No.

@alexshtin alexshtin requested a review from a team as a code owner December 21, 2024 00:10
@@ -88,11 +88,19 @@ func (a *localActivities) GetNamespaceInfoActivity(ctx context.Context, nsID nam

getNamespaceResponse, err := a.metadataManager.GetNamespace(ctx, getNamespaceRequest)
if err != nil {
var nsNotFoundErr *serviceerror.NamespaceNotFound
if stderrors.As(err, &nsNotFoundErr) {
ns := nsName.String()
Copy link
Contributor

Choose a reason for hiding this comment

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

surprised this is not a part of a regular NamespaceNotFound

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