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

Refactor components interfaces #386

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koct9i
Copy link
Collaborator

@koct9i koct9i commented Nov 5, 2024

Split layers slightly more clearly

@koct9i koct9i force-pushed the refactor-components-interfaces branch from 282418d to dbc03e6 Compare November 6, 2024 15:36
@koct9i koct9i marked this pull request as draft November 6, 2024 17:04
Copy link
Collaborator

@l0kix2 l0kix2 left a comment

Choose a reason for hiding this comment

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

Could you please write some motivation behind this change when it would be ready for review (not draft)?

@@ -152,22 +152,23 @@ func NewComponentManager(
return nil, err
}

componentStatus, err := c.Status(ctx)
componentStatus, err := c.Sync(ctx, true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it is clearer semantically and easier to read Status() method for this read-only action instead less obvious Sync(ctx, true) which is look like we are syncing but dry-running.
I think tradeoff of extra method in each component should be in favour of readability in place of use in that case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR in intermediate state so there might be rough pieces. I don't like this one too.
Unfortunately there is no defined clear semantics. I'm trying to make one.

baseExecNode
localComponent
master Component
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think it is ok to have server twice: inside localServerComponent struct and inside baseExecNode here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no problems with that since this is reference, not instance itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants