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 list_buckets function and tests to Object API #169

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

jcreager
Copy link
Contributor

@jcreager jcreager commented Sep 14, 2024

This PR closes #168 and adds the ability to list Object bucket streams, replicating the nats CLI command nats object ls.

Credit to @lsxliron as this PR is based off of their PR to add the list_buckets function to the KV API.

@mmmries
Copy link
Collaborator

mmmries commented Sep 16, 2024

Hey @jcreager thank you so much for opening the issue and then putting up a PR ❤️ 💛 💙 💚 💜
On my first reading I don't see any problems here, but I'm short on time and haven't had much time to think about it. I'd like to take a second pass before making a final decision. Hopefully I can find time this week to review and leave any notes.

@jcreager
Copy link
Contributor Author

Right on, thanks @mmmries.

Copy link
Collaborator

@mmmries mmmries left a comment

Choose a reason for hiding this comment

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

The only comment I left is something that would apply only for cases where Jetstream is hosting a large number of streams and we would potentially miss a bucket.

I think we can tackle that in a follow-up PR since it affects both of these functions and we'll probably want to handle them the same

lib/gnat/jetstream/api/object.ex Show resolved Hide resolved
@jcreager
Copy link
Contributor Author

@mmmries I have created #172 to handle the pagination feature.

@jcreager
Copy link
Contributor Author

Hey @mmmries just following up to see if you feel this is ok to merge.

@mmmries mmmries merged commit 6f84323 into nats-io:main Sep 24, 2024
3 checks passed
@mmmries
Copy link
Collaborator

mmmries commented Sep 24, 2024

I'll get this released in a new patch version this evening. Thanks again for the contribution

@jcreager
Copy link
Contributor Author

Thanks @mmmries! I'm happy I was able to make a contribution.

@jcreager jcreager deleted the list-objects-168 branch September 25, 2024 00:57
@mmmries
Copy link
Collaborator

mmmries commented Sep 25, 2024

Released as version 1.8.5 https://hex.pm/packages/gnat/1.8.5

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.

Cannot list Jetstream object buckets
2 participants