Skip to content

feat(query): add api to list stream - #18701

Merged
bohutang merged 21 commits into
databendlabs:mainfrom
everpcpc:feat-api-stream
Sep 10, 2025
Merged

feat(query): add api to list stream#18701
bohutang merged 21 commits into
databendlabs:mainfrom
everpcpc:feat-api-stream

Conversation

@everpcpc

@everpcpc everpcpc commented Sep 9, 2025

Copy link
Copy Markdown
Member

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.

  • Implements /v1/catalog/databases/{database}/streams GET endpoint to retrieve streams in a specified database
  • Adds comprehensive test coverage for the new streams listing API
  • Includes proper error handling for non-existent databases and stream conversion failures

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions Bot added the pr-feature this PR introduces a new feature to the codebase label Sep 9, 2025
@everpcpc
everpcpc requested a review from Copilot September 9, 2025 06:39

This comment was marked as outdated.

@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

🤖 Smart Auto-retry Analysis

Workflow: 17601755455

📊 Summary

  • Total Jobs: 83
  • Failed Jobs: 1
  • Retryable: 0
  • Code Issues: 1

NO RETRY NEEDED

All failures appear to be code/test issues requiring manual fixes.

🔍 Job Details

  • linux / test_private_tasks: Not retryable (Code/Test)

🤖 About

Automated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed).

@everpcpc
everpcpc marked this pull request as ready for review September 9, 2025 09:42
@everpcpc
everpcpc requested review from TCeason and zhyass September 9, 2025 09:42
Comment thread src/query/service/src/servers/http/v1/catalog/list_database_streams.rs Outdated
@everpcpc
everpcpc requested a review from Copilot September 10, 2025 02:41

This comment was marked as outdated.

@everpcpc
everpcpc requested a review from Copilot September 10, 2025 02:52

This comment was marked as outdated.

@everpcpc
everpcpc requested a review from Copilot September 10, 2025 02:57

This comment was marked as outdated.

@everpcpc
everpcpc requested a review from Copilot September 10, 2025 03:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@zhyass zhyass left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@bohutang
bohutang merged commit 254d06b into databendlabs:main Sep 10, 2025
271 of 279 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants