224 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
94dcaca630 update protoc to v3.14.0
Updating to the lowest release that includes [protobuf@dfab275], which
removed use of the github.com/golang/protobuf/ptypes/timestamp.Timestamp
type alias (deprecated).

[protobuf@dfab275]: dfab275eca

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-06-05 18:01:59 +02:00
Tõnis Tiigi
550cf8b8b7 Merge pull request #6774 from tonistiigi/0513-dev-tools-updates
dev tools updates
2026-05-14 17:37:14 -07:00
Tonis Tiigi
64f364fd9f update protolint to v0.56.4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:22 -07:00
Tonis Tiigi
2beb143001 update govulncheck to v1.3.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:21 -07:00
Tonis Tiigi
4ffb02ffcd update doctoc to v2.4.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:21 -07:00
Tonis Tiigi
bd3608ddc9 lint: update golangci-lint to v2.12.2
Update golangci-lint and adjust code for new gosec diagnostics. Use
root-scoped filesystem operations where appropriate, preserve explicit
user path behavior for SSH keys, and avoid background contexts in
request-scoped cleanup paths.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:15 -07:00
CrazyMax
f3c6fef9b6 hack: switch to gomod-updates
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-13 13:52:17 +02:00
Jonathan A. Sternberg
cf6b18e7c9 chore: prune unused protobuf files from googleapis
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2026-04-09 14:58:46 -05:00
CrazyMax
0e440708bf hack: print the README diff when doctoc validation fails
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-07 11:08:15 +02:00
Sebastiaan van Stijn
4eea931b28 Dockerfiles: pin doctoc to a fixed version
The v2.4.0 release had a minor regression and didn't detect the HTML
comments correctly;

```
diff --git a/README.md b/README.md
index 3f271be8625e..8ec4a7c5a421 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,7 @@ Join `#buildkit` channel on [Docker Community Slack](https://dockr.ly/comm-slack

 <!-- START doctoc generated TOC please keep comment here to allow auto update -->
 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

 - [Used by](#used-by)
 - [Quick start](#quick-start)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-04-07 10:58:44 +02:00
Tonis Tiigi
c33e1fa5cd chore: bump Go toolchain to 1.26
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-25 16:16:09 -08:00
CrazyMax
18ad342e57 Merge pull request #6460 from tonistiigi/golint-v2.8.0-update
hack: golangci v2.8.0 and gopls v0.38.0 update
2026-01-14 15:44:19 +01:00
Tonis Tiigi
5b6c89222b Dockerfile: fix version inconsistencies
Make sure Alpine, xx, Debian use same versions across Dockerfiles.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:49 -08:00
Tonis Tiigi
55ac82cb58 hack: update gopls to v0.38.0
Currently it is not possible to update to more
recent version as modernize causes errors in generated code.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:25 -08:00
Tonis Tiigi
a8b83196f3 ci: update golangci to v2.8.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:20 -08:00
CrazyMax
0ad7a44d11 update alpine to 3.23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-12 09:57:19 +01:00
Jonathan A. Sternberg
f4339fd00b tools: utilize the new tool functionality introduced in go 1.24
Removes the `tools/tools.go` file used as a hack to get `go.mod` to
track tools in favor of the new method introduced in go 1.24 of being
formally supported in the `go.mod` file. This will allow the tools to be
managed with the new `go get tool` and `go install tool` commands.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-09-10 10:08:03 -05:00
Tonis Tiigi
04dbf0ba44 update go to 1.25
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-09-09 15:14:18 -07:00
CrazyMax
060be8484d hack: modernize-fix bake target
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-09 14:00:26 +02:00
CrazyMax
e70ed65cbc update alpine to 3.22
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-27 11:34:46 +02:00
CrazyMax
628d5cb2cb dockerfile: update govulncheck to v1.1.4
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-23 10:00:51 +02:00
Tonis Tiigi
9fcedf9807 update gopls to go1.24 compatible version
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-07 18:23:20 -07:00
Tonis Tiigi
3e5d4dcdf8 update to go1.24
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-07 16:59:15 -07:00
Tonis Tiigi
f1f56c2b77 golangci-lint: v2 upgrade
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-02 12:19:17 -07:00
Jonathan A. Sternberg
4fc3a2d435 hack: aggregate protobuf includes to a separate stage
This moves the aggregation of the various protobuf includes (binaries
and include files) to a separate stage so the files can be retrieved
more easily by external tools.

Since the canonical way of retrieving the protobuf dependencies is to
use this file and the dependencies can be quite complicated to retrieve,
this makes it easier for outside contributors to retrieve the
dependencies and copy them into their own repositories.

This was possible before by using the `tools` target, but that would
also include the entire `golang` image. Now you can retrieve just the
`protobuf` target to get the binaries and the include files.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-04-14 11:00:14 -05:00
Tonis Tiigi
630067bb9a hack: allow building golangci from source for custom versions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-17 17:43:49 -07:00
Tonis Tiigi
b5286f8dcb apply x/tools/modernize fixes
Autogenerated with couple of manual patches.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-07 08:18:45 -08:00
Tonis Tiigi
9a2d75f2b7 hack: remove loong64 validation in archutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-12-16 09:42:10 -08:00
Tonis Tiigi
6126614b5c update Alpine to v3.21
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-12-09 19:06:40 -08:00
Tonis Tiigi
e276044245 update xx to v1.6.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-12-09 19:06:34 -08:00
Tõnis Tiigi
be6f193e01 Merge pull request #5492 from crazy-max/go-1.23
update to go 1.23
2024-11-07 13:29:37 -08:00
CrazyMax
e5186004f0 dockerfile: missing updates of xx to 1.5.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-07 11:19:22 +01:00
CrazyMax
8f81390c1c update to go 1.23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-07 11:09:26 +01:00
Tonis Tiigi
41f9ca6ff2 hack: update protolint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-04 18:13:05 -08:00
Tonis Tiigi
0fe016fee7 hack: update gopls to 0.26
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-04 17:33:30 -08:00
Tonis Tiigi
6cb3aafd5a fixes for dockerfile checks
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-10-08 16:05:46 -07:00
CrazyMax
6e826f00d7 Revert "dockerfile: pin dockerfile frontend image"
This reverts commit c5de0b9020.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-10-08 15:53:47 -07:00
Jonathan A. Sternberg
41a0a0c37d protobuf: add vtproto as a supplemental marshaler
vtproto is an extra protobuf compiler that generates special methods
suffixed with `VT` that create typed and unrolled marshal and unmarshal
functions similar to gogo that can be used for performance sensitive
code. These extensions are optional for code to use but buildkit uses
them.

A codec is also included to utilize vtproto for grpc code. If the
package `github.com/moby/buildkit/util/grpcutil/encoding/proto` is
imported then vtproto will be used if it exists and otherwise it will
use the standard marshaling and unmarshaling methods.

This codec has an important difference from the default codec. The
default codec will always reset messages before unmarshaling. In most
cases, this is unnecessary and is only relevant for `RecvMsg` on
streams. In most cases, if we are passing in an existing message to this
method, we want to reuse the buffers. This codec will always merge the
message when unmarshaling instead of resetting the input message.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-10-04 12:52:15 -05:00
Jonathan A. Sternberg
ffd8ff490e protobuf: normalize how protobuf files are generated
The relative paths option for protoc generators doesn't work well when
it comes to dependencies. This simplifies the code generation to avoid
using `go generate` and to use one global command for protoc generation.

This is similar to https://github.com/docker/buildx/pull/2713 since the
same problems with code generation occur here too.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-10-03 17:40:53 -05:00
CrazyMax
c5de0b9020 dockerfile: pin dockerfile frontend image
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-27 15:33:57 +02:00
Jonathan A. Sternberg
1a3fc0aa15 protobuf: remove gogoproto
Remove gogoproto in favor of the standard protobuf compiler. This
removes any nonstandard extensions that were part of gogoproto such as
the custom types.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-09-26 12:57:45 -05:00
Alberto Garcia Hierro
892e756394 debug: add trace flight recorder
Use golang.org/x/exp/trace to implement an trace recorder that saves the trace
to a circular buffer and can be retrieved at any time.

Debug endpoints have been added under /debug/flight to start and stop the trace
as well as to set its period.

Due to golang.org/x/exp/trace, the minimum go version has been bumped to 1.22

Signed-off-by: Alberto Garcia Hierro <damaso.hierro@docker.com>
2024-09-23 21:01:19 +01:00
Tonis Tiigi
87e0f4bf08 hack: update golangci-lint to 1.61
Unblock CI with the schema verify error in 1.60

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-09-09 14:22:27 -07:00
Tonis Tiigi
df0d9d791d ci: update golangci-lint to v1.60.1
Previous version runs out of memory on go1.23

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-08-14 16:29:22 +03:00
Tonis Tiigi
b8f3379ae9 ci: enable validating all Dockerfiles
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-08-13 11:13:33 +03:00
CrazyMax
255b223e0a hack: ensure SARIF output has results field defined for govulncheck
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-09 10:49:49 +02:00
CrazyMax
d138ca0f8a govulncheck to report known vulnerabilities
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-30 12:55:38 +02:00
Tonis Tiigi
85707bf7e8 archutil: fix build for arm64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-06-20 22:16:40 -07:00
retornam
6dd6e08ef7 Update Go to 1.22
Signed-off-by: Raymond Etornam <retornam@users.noreply.github.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-06-18 18:05:16 -07:00
CrazyMax
7283eaba0d dockerfile: generate lint rules documentation
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-06 15:11:27 -07:00