Skip to content

Conversation

@codelipenghui
Copy link
Contributor

Motivation

Implement PIP-431 support in the Go client admin API. This adds and to topic statistics.

Modifications

  • Added and fields to and in .
  • Added integration tests and in .

Verifying this change

  • Make sure that the change passes the CI checks.

This change is covered by the new integration tests.

Copy link
Contributor

Copilot AI left a comment

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 implements PIP-431 support in the Go client admin API by adding topic creation and last publish timestamps to topic statistics. The changes enable clients to track when topics were created and when messages were last published to them.

  • Added TopicCreationTimeStamp and LastPublishTimestamp fields to both TopicStats and PartitionedTopicStats structs
  • Implemented comprehensive integration tests to verify timestamp behavior for both regular and partitioned topics
  • Both fields use omitempty JSON tags to maintain backward compatibility

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
pulsaradmin/pkg/utils/data.go Added TopicCreationTimeStamp and LastPublishTimestamp fields to TopicStats and PartitionedTopicStats structs with appropriate JSON tags
pulsaradmin/pkg/admin/topic_test.go Added integration tests TestTopicStatsTimestamps and TestPartitionedTopicStatsTimestamps to verify timestamp behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@RobertIndie RobertIndie left a comment

Choose a reason for hiding this comment

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

PTAL at the copilot's comments.

@codelipenghui codelipenghui merged commit 9d65d0e into master Dec 17, 2025
17 of 18 checks passed
@RobertIndie RobertIndie deleted the pip-431-support branch December 17, 2025 02:16
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.

3 participants