Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[OPIK-844] Add support for span comments #1137

Merged
merged 8 commits into from
Jan 27, 2025

Conversation

BorisTkachenko
Copy link
Contributor

Details

Add support for span comments

Testing

Integration tests

@BorisTkachenko BorisTkachenko self-assigned this Jan 24, 2025
@BorisTkachenko BorisTkachenko requested a review from a team as a code owner January 24, 2025 16:21
import static org.assertj.core.api.Assertions.assertThat;

@RequiredArgsConstructor
public abstract class BaseTestClient {
Copy link
Contributor

Choose a reason for hiding this comment

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

BaseCommentResourceClient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suggest to keep the current name. It's not an interface, but a base class, and not only comments could be added there. For example feedback-scores related endpoints could be moved there too. Plus we could move there some common code, like authentication related tests, which are now just copypasted for all Resource tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's too generic, and adding too much logic from different entities will make it difficult to maintain. It's better to separate responsibilities and favor composition if more entities are needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is test client, and only logic here is for calling endpoints. So functions count here would be not more than number of endpoints per class. And considering that we could put here only endpoints which are same between classes it will be even less. Do not see how it might become with too much logic.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm approving as it is not critical, but unscoped classes tend to grow and acquire too much responsibility; if we don't scope, another engineer may see this as a utils class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed it as you suggested. In future I guess we could add new BaseTestClient where we could put endpoints which are same for almost all classes, like create, getById, batchDelete...
But it's too much refactoring for this task:)
I never planned this to be an utility class, only a centralized client to call endpoints. I guess we should separate these concerns in tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, we can start adding some technical debit tickets to the backlog so we don't forget it.

thiagohora
thiagohora previously approved these changes Jan 27, 2025
@BorisTkachenko BorisTkachenko force-pushed the boryst/OPIK-844-add-support-for-span-comments branch from dde95f8 to f7b84eb Compare January 27, 2025 14:10
@BorisTkachenko BorisTkachenko merged commit 0fd113e into main Jan 27, 2025
9 checks passed
@BorisTkachenko BorisTkachenko deleted the boryst/OPIK-844-add-support-for-span-comments branch January 27, 2025 14:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants