Commit Graph

17 Commits (b92a6170cf1413f37b51b0a874ba8216746b30ba)

Author SHA1 Message Date
Cory Bennett 0b683eb1ff add missing ExtraHosts to gateway exec
Also adding tests for ExtraHosts and NetMode via gateway exec

Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-08-15 02:51:37 +00:00
Tonis Tiigi cfb73e5007 hack: avoid updating generated proto version
This can be done as a separate change when needed.
Also should analyze if this would affect the gogo
incompatibility issues with newer proto.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Sebastiaan van Stijn 056afec140
generated files: update google/protobuf v1.3.5, and fix install for go modules
This patch updates the script and Dockerfile to prevent issues when using go
modules.

The first change is to use a plain `git clone` instead of `go get -d` to download
the source. While (like "pre go-modules") `go get -d` won't *build* the binaries
when go modules are used, it *will* use go modules to download the package
(and dependencies); as a result:

- no git repository will be cloned in gopath
- go modules will be downloaded for "master" (not the version that we specify
  to build)

Note: Once we update to Go 1.16, this script could be updated to use `go install <repo>@version`

The second change is an update to the `update-generated-files` script to detect
the correct version of google/protobuf to use from the `go.mod`'s  `replace` rule,
to make sure we generate (and verify) using the correct version.

The Dockerfile was also updated to update the default versions specified in the
PROTOBUF_VERSION and GOGO_VERSION build-args (although not strictly necessary).

Regenerating the files with this version resulted in a minor formatting change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 23:23:53 +02:00
CrazyMax b4bdad2bd1
Refactor generators for GitHub Actions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-22 01:34:36 +01:00
Tonis Tiigi 8c55320f45 hack: add shfmt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-24 21:17:54 -07:00
Edgar Lee bb0ed03111 Fix update generated files via docker buildkit
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-11-01 10:37:00 -07:00
Akihiro Suda 5938170b84 hack: rename Dockerfiles
Fix https://github.com/moby/buildkit/issues/1208

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-18 17:21:48 +09:00
Akihiro Suda e2ea141383 hack: remove legacy Dockerfile
Fix #1022

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-13 00:10:27 +09:00
Dave Chen 28c9923fc1 Stop using the deprecated flag "--frontend-opt" for build
This patch replace "--frontend-opt" to "--opt" for the place
where it is appliable.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-03-20 19:04:14 -07:00
Dave Chen c7ac2f392a Stop using the deprecated way for build
Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-03-19 19:01:31 -07:00
Tibor Vass 175506ff7f hack: update scripts to be go mod compatible
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-01-31 22:44:47 +00:00
Patrick Van Stee f6c2487225
Isolate generated files for easier copying
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2019-01-06 06:49:52 -05:00
Tonis Tiigi ddfb7f77c9 hack: update test dockerfiles to buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-10 23:26:05 -07:00
Tonis Tiigi 49fdb4c078 hack: prefer buildkit for generated files
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 10:35:59 -07:00
Ian Campbell ec18d4ead1 generate-files: auto sync gogo version to vendor.conf
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 13:45:50 +01:00
Ian Campbell d9b64588cb Regenerate protobuf go file with gogoproto v0.5
This matches the version in vendor.conf, the previous version was `v0.5~25`
according to `git describe`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 13:45:50 +01:00
Ian Campbell 17069fe7e4 Validation and (controlled) generation for go generate'd files.
Modelled after the vendor support provide a validator and an updator for files
produced by `go generate` (which today just means `*.pb.go`).

Main difference from the vendor support is that we are no longer simply nuking
and replacing a single directory, so I ended up hardcoding `*.pb.go` in a bunch
of places which I don't like but cannot see a way around which doesn't risk
nuking people's other local changes.

The generated files are placed in an unpacked form in a `FROM scratch`
container for update. Use a subdirectory and `tar --strip-components` (portable
to MacOS and Linux according to `tar(1)`) since trying to do a `docker export`
of just the root ends up adding `.dockerenv`, `sys`, `proc` and `dev` to the
source tree.

The validate container is not `FROM scratch` because we want `cat`.

The run in `frontend/gateway/pb/generate.go` was missing an include so fix
that.

The versions of `protoc` and the gogo plugins were chosen to regenerate the
existing code as closely as possible. The updates to `*.pg.go` here are all the
result of regenerating with go1.9 which fixed
https://github.com/golang/go/issues/17663 and replaced an invalid timestamp in
the gzip header of the data encoded in `fileDescriptor*`, and adopted a new
standard for marking generated files.

Finally, I noticed that my `docker run`s were missing an `--rm` which I
inherited from `validate-vendor`, so fix all those.

Closes: #322

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-03-28 10:52:16 +01:00