-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Vault 1979: Query API for Irrevocable Leases #11607
Merged
Merged
Changes from 15 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
483feae
build out lease count (not fully working), start lease list
swayne275 9d9f837
build out irrevocable lease list
swayne275 41dfaba
bookkeeping
swayne275 167ab90
Merge branch 'master' into vault-1979_expr-irrevocable-query-api
swayne275 ed4f011
test irrevocable lease counts for API/CLI
swayne275 e76af8a
fix listIrrevocableLeases, test listIrrevocableLeases, cleanup
swayne275 6ab77e4
test expiration API limit
swayne275 61786f5
namespace tweaks, test force flag on lease list
swayne275 7bc6712
integration test leases/count API, plenty of fixes and improvements
swayne275 a5450c8
Merge branch 'master' into vault-1979_expr-irrevocable-query-api
swayne275 e18fad4
test lease list API, fixes and improvements
swayne275 61e8316
test force flag for irrevocable lease list API
swayne275 d5164e3
i guess this wasn't saved on the last refactor...
swayne275 fb8b995
fixes and improvements found during my review
swayne275 b81ea9b
better test error msg
swayne275 743a32b
Merge branch 'master' into vault-1979_expr-irrevocable-query-api
swayne275 6114caa
Update vault/logical_system_paths.go
swayne275 0d61f9c
Update vault/logical_system_paths.go
swayne275 cb47c4a
return warning with data if more than default leases to list without …
swayne275 e5dafb4
make api doc more generalized
swayne275 6f2abe7
list leases in general, not by mount point
swayne275 da988f9
change force flag to include_large_results
swayne275 d06e923
sort leases by LeaseID for consistent API response
swayne275 33c1d4c
switch from bool flag for API limit to string value
swayne275 23a1082
sort first by leaseID, then stable sort by expiration
swayne275 3b618b8
move some utils to be in oss and ent
swayne275 fd2044d
Merge branch 'master' into vault-1979_expr-irrevocable-query-api
swayne275 585caea
improve sort efficiency for API response
swayne275 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
core: add irrevocable lease list and count apis | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One downside to using a sync.Map here is that the range scans will be unordered. We could sort the leases before returning them, but in the case where there are
> MaxIrrevocableLeasesToReturn
leases we may return a different set of leases each call. For now should we sort the values before returning them?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i think there's benefit to that consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've also thought that getting away from
sync.Map
could be nice so that when there are >10,000 results we can tell the client how many to expect (without doing the work of going through all of them)... a story for another day perhapsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d06e923