Skip to content

Set BuildKit's ExportedProduct variable to show useful errors in the future#37439

Merged
tiborvass merged 3 commits intomoby:masterfrom
tiborvass:vendor-buildkit
Jul 17, 2018
Merged

Set BuildKit's ExportedProduct variable to show useful errors in the future#37439
tiborvass merged 3 commits intomoby:masterfrom
tiborvass:vendor-buildkit

Conversation

@tiborvass
Copy link
Copy Markdown
Contributor

@tiborvass tiborvass commented Jul 11, 2018

This introduces a PRODUCT environment variable that is used to set a constant
at dockerversion.ProductName.

That is then used to set BuildKit's ExportedProduct variable in order to show
useful error messages to users when a certain version of the product doesn't
support a BuildKit feature.

Vendors buildkit to c3846bd

@thaJeztah
Copy link
Copy Markdown
Member

full diff: moby/buildkit@9acf51e...c3846bd

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.

double-checked, and these all match what's already in moby/vendor.conf

@tiborvass tiborvass requested a review from tianon as a code owner July 12, 2018 02:00
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 12, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@a5495f2). Click here to learn what that means.
The diff coverage is 33.33%.

@@            Coverage Diff            @@
##             master   #37439   +/-   ##
=========================================
  Coverage          ?   34.95%           
=========================================
  Files             ?      610           
  Lines             ?    44878           
  Branches          ?        0           
=========================================
  Hits              ?    15685           
  Misses            ?    27073           
  Partials          ?     2120

@tiborvass tiborvass changed the title vendor: buildkit to c3846bd8c419d280053e4a9ba4506577665ab94d Set BuildKit's ExportedProduct variable to show useful errors in the future Jul 12, 2018
@tiborvass tiborvass requested a review from tonistiigi July 12, 2018 02:02
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.

Better to have a default value? (moby? moby-engine? dockerd?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to keep it empty, because there are no "moby releases". Docker will set this.

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.

if dockerversion.ProductName != ""

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

minor nits and question, but LGTM otherwise; let me know if you want to address them in this PR, or want to do so as a follow up

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.

"${PRODUCT}" ?

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.

Why's this commented out? Does this need a TODO?

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.

Not a super-fan of this boolean argument, but 🤷‍♂️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's in buildkit. Feel free to change it there, but I don't think it's a blocker for this PR.

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.

Yes, I saw it was implemented there :-)

Tibor Vass added 3 commits July 16, 2018 21:41
Signed-off-by: Tibor Vass <[email protected]>
This introduces a PRODUCT environment variable that is used to set a constant
at dockerversion.ProductName.

That is then used to set BuildKit's ExportedProduct variable in order to show
useful error messages to users when a certain version of the product doesn't
support a BuildKit feature.

Signed-off-by: Tibor Vass <[email protected]>
Signed-off-by: Tibor Vass <[email protected]>
@tiborvass
Copy link
Copy Markdown
Contributor Author

@thaJeztah addressed.

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@tiborvass
Copy link
Copy Markdown
Contributor Author

unrelated CI failures

@tiborvass tiborvass merged commit 9ebed53 into moby:master Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants