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

Migrate Command Runner Constructors to Use Config Objects #269

Merged
merged 7 commits into from
Nov 14, 2022

Conversation

nwchandler
Copy link
Collaborator

@nwchandler nwchandler commented Nov 10, 2022

This merge updates the Command constructors to leverage a new CommandConfig object, rather than parameters. The intention is to simplify future feature additions by limiting changes to the function signatures of these constructors.

@@ -38,12 +38,21 @@ func (r IPTables) ID() string {

func (r IPTables) Run() op.Op {
startTime := time.Now()
if r.OS == "linux" {
if r.OS != "linux" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unrelated to the change at hand, but this looked like a little bug that had crept in as part of a recent merge.

Copy link
Collaborator

@groovemonkey groovemonkey left a comment

Choose a reason for hiding this comment

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

Yeah, this could work -- it's certainly a nicer interface for people who aren't intimately familiar with our runners. My kingdom for named arguments in Go...

Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

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

This looks good! My only review item is nonblocking: we should lean on "string" as the default Format, like hcl, and elide the field in cfg when we're not overriding it.

@nwchandler nwchandler marked this pull request as ready for review November 14, 2022 16:54
@nwchandler nwchandler merged commit 2e08171 into main Nov 14, 2022
@nwchandler nwchandler deleted the nwchandler/cori2-544-pt1-config-objects branch November 14, 2022 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants