-
Notifications
You must be signed in to change notification settings - Fork 60
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
cleanup(cmd,internal,pkg): move driver config
options to be common to all driver
commands
#365
Conversation
…ll `driver` commands. This way all driver commands can customize their run with both CLI args or env variables, without actually storing anything in the config file. Signed-off-by: Federico Di Pierro <[email protected]>
} | ||
} | ||
|
||
if driverTypes.String() != "auto" { |
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.
Here we load driver.Type
from given driverTypes
enum parameter.
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.
We now support auto
logic for all driver commands.
This can be useful to eg: test with driver printenv
which driver is being discovered for auto
driver type.
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.
Or, to store driver config with correct driver built from automatic discovered one (when using driver config --type auto
).
return fmt.Errorf("automatic driver selection failed") | ||
} | ||
} | ||
return driver.Validate() |
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.
In the end, we validate driver options.
/milestone v0.7.0 |
driver config
options to be common to all driver
commandsdriver config
options to be common to all driver
commands
…nds. Moreover, enforce that driver version is a semver and repos is a list of requestURI. Signed-off-by: Federico Di Pierro <[email protected]>
64c711a
to
83db87c
Compare
} | ||
} | ||
|
||
if driverTypes.String() != "auto" { |
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.
const
?
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.
@FedeDP just nit
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area library
/area cli
What this PR does / why we need it:
This way all driver commands can customize their run with both CLI args or env variables, without actually storing anything in the config file.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: