Skip to content

Conversation

@rubvs
Copy link
Contributor

@rubvs rubvs commented Sep 9, 2025

Add a clear abstraction layer between project and admin topic creation. This PR introduces a CreateAdminTopics and CreateProjectTopics method, along with some helper functions to improve code readability.

@rubvs rubvs marked this pull request as ready for review September 10, 2025 14:45
@rubvs rubvs requested a review from marclop September 10, 2025 14:45
Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

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

I don't think we should be exposing these primitives in this library, We can fix the issues we're seeing in a different way. For completeness, I've provided some feedback on Slack.

trace.WithAttributes(
semconv.MessagingSystemKey.String("kafka"),
),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the TODO comment, since I think this is redundant now.


// Remove cleanup.policy if it exists,
// since this field cannot be altered.
delete(c.topicConfigs, "cleanup.policy")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apart from the code refactoring, this is really the only logic change in this PR. cc @marclop

},
},
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test that the cleanup.policy is actually deleted.

return topics[i].Configs[a].Name < topics[i].Configs[b].Name
})
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Helper functions to assert configs with multiple fields.

@rubvs rubvs requested a review from marclop September 11, 2025 15:43
MeterProvider: mt.MeterProvider,
})
require.NoError(t, err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved for readability.

Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

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

Thanks for the updates. Let's get this merged.

@rubvs rubvs merged commit 2a0c89a into main Sep 12, 2025
6 checks passed
@rubvs rubvs deleted the admin-topic branch September 12, 2025 12:51
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