Skip to content

Make command name in docker.#Run optional - #1749

Closed
helderco wants to merge 1 commit into
dagger:mainfrom
helderco:optional-command-name
Closed

helderco wants to merge 1 commit into
dagger:mainfrom
helderco:optional-command-name

Conversation

@helderco

Copy link
Copy Markdown
Contributor

Fixes #1626

Signed-off-by: Helder Correia

@helderco
helderco requested a review from shykes March 10, 2022 12:04
@netlify

netlify Bot commented Mar 10, 2022

Copy link
Copy Markdown

@helderco

helderco commented Mar 10, 2022 •

Copy link
Copy Markdown
Contributor Author

Not super attached to this, just a bit easier sometimes.

client: commands also has a non-optional name but it ties directly into Go which does the same:

func Command(name string, arg ...string) *Cmd

https://pkg.go.dev/os/[email protected]#Command

(I know... implementation detail)

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@aluzzardi

Copy link
Copy Markdown
Contributor

Code LGTM. API LGTM @shykes ?

@shykes

shykes commented Mar 10, 2022

Copy link
Copy Markdown
Contributor

This is my design gut feeling talking... I worry that this "command API" still has fundamental issues, and will eventually require a redesign (hopefully not too disruptive). Because of this damocles sword above our heads of a future redesign, my instinct is to not add too much flexibility, different ways to do the same thing, etc. because it will be more special cases to support and migrate if we redesign. It kind of reminds me of CMD + ENTRYPOINT in Dockerfile, which came about incrementally, and the result was a maze of special case behavior which everyone is now stuck with.

So TLDR: I personally don't mind this pattern, in general I'm in favor of adding convenience, but in this case I would prefer to delay, because of possible near-term redesign and the need to keep our options open.

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.

Allow control over exec args in docker.#Run

4 participants