Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

build metrics compatibility for next 22.06 - #2151

Merged
nicksieger merged 1 commit into
docker-archive:mainfrom
crazy-max:build-metrics-futureproof
Jul 27, 2022
Merged

build metrics compatibility for next 22.06#2151
nicksieger merged 1 commit into
docker-archive:mainfrom
crazy-max:build-metrics-futureproof

Conversation

@crazy-max

Copy link
Copy Markdown
Contributor

follow-up docker/cli#3314 and #2104

Ensures build metrics are future proof for the next Docker major release.

To detect if buildx will be used while typing docker build ..., we need to check the current docker cli version. I don't think there is another simple way, besides creating an infamous custom dimension in Looker. 😅

cc @tonistiigi@chris-crone@gtardif@mat007

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

Comment threadcli/main.go Outdated
Comment threadcli/metrics/metadata/build.go Outdated
@crazy-max
crazy-maxforce-pushed the build-metrics-futureproof branch from 5b8f702 to 42f0e08CompareMay 23, 2022 13:20
@crazy-max
crazy-max marked this pull request as draft May 23, 2022 17:11
@crazy-max

Copy link
Copy Markdown
ContributorAuthor

converting to draft for now. after discussing with @tonistiigi, calling docker version to retrieve cli version for build metadata adds more overhead (~80ms). will take a look at a better alternative.

@crazy-max
crazy-maxforce-pushed the build-metrics-futureproof branch from 42f0e08 to 1667e0bCompareMay 26, 2022 07:24
@crazy-max
crazy-max marked this pull request as ready for review June 13, 2022 08:51
Comment threadcli/metrics/metrics.go Outdated
@crazy-maxcrazy-max mentioned this pull request Jul 23, 2022
@crazy-max
crazy-max marked this pull request as draft July 24, 2022 07:02
@crazy-max
crazy-maxforce-pushed the build-metrics-futureproof branch from 1667e0b to 37d3c02CompareJuly 25, 2022 13:27
@crazy-max

crazy-max commented Jul 25, 2022

Copy link
Copy Markdown
ContributorAuthor

Switch from shelling out to retrieve docker cli version by using the debug/buildinfo module. Atm docker cli strips DWARF symbol table so will be empty for cli < 22.06 but will be solved by docker/cli#3717.

PTAL @mat007@rumpl@glours

@crazy-max
crazy-max marked this pull request as ready for review July 25, 2022 13:31
@crazy-max
crazy-max requested review from mat007 and rumplJuly 25, 2022 13:31
@crazy-max
crazy-maxforce-pushed the build-metrics-futureproof branch 4 times, most recently from 8182ed4 to 69495d8CompareJuly 25, 2022 19:45
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
crazy-maxforce-pushed the build-metrics-futureproof branch from 69495d8 to 668b262CompareJuly 27, 2022 15:31
@nicksieger
nicksieger merged commit 6135c5e into docker-archive:mainJul 27, 2022
@crazy-max
crazy-max deleted the build-metrics-futureproof branch July 27, 2022 17:14
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@crazy-max@nicksieger@rumpl@mat007