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 some helpers to the sdk for working with namespaces. #25270

Merged
merged 6 commits into from
Feb 9, 2024

Conversation

ncabatoff
Copy link
Collaborator

@ncabatoff ncabatoff commented Feb 7, 2024

These are some tools for working with namespaces that I'm pulling out of a bigger PR. I don't want to put them in the API right now, both because one of them is almost certainly test-only (DeleteAllNamespaces), and because I think there are more basic CRUD namespace operations missing from the API which I don't have time to implement right now. I think they're better in the sdk rather than vault proper because I could imagine external repos wanting to use them.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Feb 7, 2024
Copy link

github-actions bot commented Feb 7, 2024

CI Results:
Failures:

Test Type Package Test Logs
race vault TestOIDC_PeriodicFunc view test results
race vault TestOIDC_PeriodicFunc/test-key view test results

@ncabatoff ncabatoff marked this pull request as ready for review February 9, 2024 13:20
Copy link

github-actions bot commented Feb 9, 2024

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@VioletHynes VioletHynes left a comment

Choose a reason for hiding this comment

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

These seem like good additions, I'm not averse to these being added, but is there a use case we're supporting here? To me it seems like stuff like namespace.Canonicalize or namespace.SplitIDFromString would be more broadly useful in the SDK. I'm also a little squeamish about these being added without corresponding tests (or tests that consume them).

@ncabatoff
Copy link
Collaborator Author

These seem like good additions, I'm not averse to these being added, but is there a use case we're supporting here? To me it seems like stuff like namespace.Canonicalize or namespace.SplitIDFromString would be more broadly useful in the SDK. I'm also a little squeamish about these being added without corresponding tests (or tests that consume them).

The main use case is when running multiple tests using the same cluster and you want to clean up any namespaces created by the previous test.

The code is exercised in some other PRs I'm working on on the ent side.

@ncabatoff ncabatoff merged commit 53f0622 into main Feb 9, 2024
81 of 83 checks passed
@ncabatoff ncabatoff deleted the add-namespace-helpers branch February 9, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants