-
Notifications
You must be signed in to change notification settings - Fork 682
Fix: Pass SSHLocalPort
as an option to configure driver
#3746
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
base: master
Are you sure you want to change the base?
Conversation
6a71b1b
to
006b8ab
Compare
Signed-off-by: Ansuman Sahoo <[email protected]>
006b8ab
to
4ccf7d9
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.
I only meant to wrap the "int" second parameter in a struct, I think the first parameter was good as it was.
The name can be discussed, if it is ConfigOption or RuntimeOption or whatever it is actually referring to
// SetConfig sets the configuration for the instance. | ||
Configure(inst *store.Instance, sshLocalPort int) *ConfiguredDriver | ||
// Configure sets the configuration for the instance. | ||
Configure(opts ...ConfigOption) *ConfiguredDriver |
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 we want to keep the instance, since that will always be there.
Configure(inst *store.Instance, opts ...ConfigOption) *ConfiguredDriver
@@ -41,8 +41,7 @@ message StartResponse { | |||
} | |||
|
|||
message SetConfigRequest { | |||
bytes instance_config_json = 1; | |||
int64 ssh_local_port = 3; | |||
bytes config_opts = 1; |
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.
might have to decide on a transport here
@@ -41,8 +41,7 @@ message StartResponse { | |||
} | |||
|
|||
message SetConfigRequest { | |||
bytes instance_config_json = 1; |
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 one should remain, I think?
This pull request refactors the configuration mechanism for drivers in the
pkg/driver
package, replacing the previous method of passing individual parameters with a more flexible options-based approach. The changes introduce a newOptions
struct andConfigOption
type, enabling dynamic configuration and improving code maintainability and extensibility.Closes #3703