-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: main
Are you sure you want to change the base?
Conversation
282418d
to
dbc03e6
Compare
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Split layers slightly more clearly