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

[exporterhelper] Convert internal request interface into a struct #8435

Closed
wants to merge 1 commit into from

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Sep 13, 2023

At this point, we have two interfaces for request: public and internal. There is no need to have the internal interface. Replacing it with a struct makes the logic easier to follow.

This change replaces the internal interface with a struct embedding the public interface. This requires moving the public interface to a separate package which makes the module structure cleaner anyway.

It also adds a new optional request interface to handle partial failures.

Updates #8122

@dmitryax dmitryax requested review from a team and Aneurysm9 September 13, 2023 03:53
@dmitryax dmitryax force-pushed the refactor-request branch 5 times, most recently from 26e138f to d556a2d Compare September 13, 2023 20:58
At this point we have two interfaces: public and internal. Each interface have their own implementation which makes it hard to read.

This change replaces the internal interface with a struct embedding the public interface. This requires moving the public interface to a separate package which makes the module structure cleaner anyway
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: exporterhelper
Copy link
Member

Choose a reason for hiding this comment

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

You can avoid this for the moment, by duplicating the interfaces for the moment since that works in go. I think is better to postpone a bit this, since I think with the new Queue interface we can make the current internal depend on the main package not the other way around.

Copy link
Member

Choose a reason for hiding this comment

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

If you don't like the duplicate code, using aliases also is an option.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 17, 2023
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Oct 31, 2023
@dmitryax dmitryax deleted the refactor-request branch November 30, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants