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

Surfaces errors from namespace delete properly #19483

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

mikenomitch
Copy link
Contributor

@mikenomitch mikenomitch commented Dec 14, 2023

Adds a "return err" that was accidentally dropped shortly after the Namespace OSS migration.

fixes #19414

@mikenomitch mikenomitch force-pushed the namespace-deletion-error-fix branch from 4cb1dbc to 04e106e Compare December 14, 2023 19:10
@mikenomitch
Copy link
Contributor Author

mikenomitch commented Dec 14, 2023

Note: I still need to test this manually. I will update this comment once I do.

EDIT: Have now manually tested and confirmed that the error is bubbling up to the API response - see below.

nomad/fsm_test.go Outdated Show resolved Hide resolved
nomad/fsm_test.go Outdated Show resolved Hide resolved
nomad/fsm_test.go Outdated Show resolved Hide resolved
@mikenomitch
Copy link
Contributor Author

Have now manually tested this and it works (with a soon-to-come UI change in another PR):

Screenshot 2023-12-14 at 3 21 35 PM

Thanks for the review - on those changes!

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM with wording suggestion on the changelog.

If we really wanted to we could also add a test to ensure non-default namespace deletions return an error; but I assume this is also caught by state store testing.

@@ -0,0 +1,3 @@
```release-note:bug
namespaces: Failed delete calls no longer return success codes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
namespaces: Failed delete calls no longer return success codes
namespaces: Fixed a bug where a 200 OK response was returned even when the namespace delete failed

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line backport/1.7.x backport to 1.7.x release line theme/namespaces type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

namespace: attempting to delete a namespace with attached variables returns 200 OK
3 participants