feat(query): add api to list stream - #18701
Merged
Merged
Conversation
Contributor
🤖 Smart Auto-retry Analysis
📊 Summary
❌ NO RETRY NEEDEDAll failures appear to be code/test issues requiring manual fixes. 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
everpcpc
marked this pull request as ready for review
September 9, 2025 09:42
zhyass
reviewed
Sep 9, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new HTTP API endpoint /v1/catalog/databases/{database}/streams to list streams within a database, expanding the existing catalog API functionality. The implementation includes comprehensive error handling for non-existent databases and proper stream metadata retrieval.
- Implements new streams listing API with proper authentication and visibility checks
- Adds comprehensive test coverage with shell script tests and expected results
- Refactors existing test assertions to improve code readability and formatting
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/query/service/src/servers/http/v1/catalog/list_database_streams.rs |
Implements the core API handler for listing streams in a database |
src/query/service/src/servers/http/v1/catalog/mod.rs |
Adds module declaration and public export for the new streams handler |
src/query/service/src/servers/http/v1/http_query_handlers.rs |
Registers the new streams endpoint in the HTTP routing table |
tests/suites/5_ee/05_stream/05_0004_ee_stream_http_api.sh |
Shell script test for the new streams API endpoint |
tests/suites/5_ee/05_stream/05_0004_ee_stream_http_api.result |
Expected test results for the streams API test |
| Various test files | Refactored assertion formatting for better readability |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
This PR adds a new HTTP API endpoint to list streams within a database, expanding the existing catalog API functionality to support stream management operations.
/v1/catalog/databases/{database}/streamsGET endpoint to retrieve streams in a specified databaseTests
Type of change
This change is