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

Adding ListQueues in History and Admin service #5110

Merged
merged 17 commits into from
Nov 16, 2023
Merged

Conversation

prathyushpv
Copy link
Contributor

What changed?
Adding ListQueues API to history service and admin service.

Why?
Operators will be using these APIs to get the list of DLQs.
A command will be added to tdbg to call this API.

How did you test it?
Unit tests with 100% coverage.

Potential risks

Is hotfix candidate?

@prathyushpv prathyushpv changed the base branch from main to ppv/listqueues1 November 14, 2023 00:09
@prathyushpv prathyushpv marked this pull request as ready for review November 14, 2023 01:03
@prathyushpv prathyushpv requested a review from a team as a code owner November 14, 2023 01:03
Copy link
Contributor

@MichaelSnowden MichaelSnowden left a comment

Choose a reason for hiding this comment

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

This looks perfect except for the missing page token in the response. I think we need that for clients to paginate properly

}

message ListQueuesResponse {
repeated string queue_names = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't clients need the next page token here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Added the token.

// enqueueing a task into the DLQ and then calling [getdlqtasks.Invoke] to verify that the right task is returned.
func TestInvoke(t *testing.T, manager persistence.HistoryTaskQueueManager) {
ctx := context.Background()
t.Run("HappyPath", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we do a paginated query on the happy path? For example, add 3 queues, query through with a page size of 2 and verify that we get all 3 once the response's next page token is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah added that to this test.

Base automatically changed from ppv/listqueues1 to main November 14, 2023 02:23
@prathyushpv prathyushpv changed the title Adding ListQueues in History and Admin service" Adding ListQueues in History and Admin service Nov 14, 2023
@prathyushpv prathyushpv enabled auto-merge (squash) November 16, 2023 18:14
@prathyushpv prathyushpv merged commit c476ce8 into main Nov 16, 2023
10 checks passed
@prathyushpv prathyushpv deleted the ppv/listqueues2 branch November 16, 2023 18:34
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.

2 participants