Skip to content

Commit

Permalink
Update 1.12 to go 1.19.2 (#17438)
Browse files Browse the repository at this point in the history
* Update go version to 1.19.2

This commit updates the default version of go to 1.19.2. This update
includes minor security fixes for archive/tar, net/http/httputil, and
regexp packages.

For more information on the release, see: https://go.dev/doc/devel/release#go1.19.2

* Update Docker versions in CI to 20.10.17

After updating Vault to go version 1.19.2, there were several SIGABRTs
in the vault tests. These were related to a missing `pthread_create`
syscall in Docker. Since CI was using a much older version of Docker,
the fix was to bump it to latest-1 (20.10.17).

While we're at it, add a note in the developer docs encouraging the use
of the latest Docker version.
  • Loading branch information
mpalmi committed Oct 7, 2022
1 parent 12df3b0 commit d463811
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 26 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .circleci/config/commands/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
default: false
go_image:
type: string
default: "docker.mirror.hashicorp.services/cimg/go:1.19.1"
default: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
use_docker:
type: boolean
default: false
Expand Down
8 changes: 4 additions & 4 deletions .circleci/config/executors/@executors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go-machine:
shell: /usr/bin/env bash -euo pipefail -c
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_VERSION: 1.19.1 # Pin Go to patch version (ex: 1.2.3)
GO_VERSION: 1.19.2 # Pin Go to patch version (ex: 1.2.3)
GOTESTSUM_VERSION: 0.5.2 # Pin gotestsum to patch version (ex: 1.2.3)
GOFUMPT_VERSION: 0.3.1 # Pin gofumpt to patch version (ex: 1.2.3)
GO_TAGS: ""
Expand All @@ -30,23 +30,23 @@ semgrep:
docker-env-go-test-remote-docker:
resource_class: medium
docker:
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.1"
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
docker-env-go-test:
resource_class: large
docker:
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.1"
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
docker-env-go-test-race:
resource_class: xlarge
docker:
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.1"
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/jobs/test-go-race-remote-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
- exit-if-ui-or-docs-branch
- checkout
- setup_remote_docker:
version: 18.09.3
version: 20.10.17
docker_layer_caching: true
- go_test:
extra_flags: "-race"
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/jobs/test-go-remote-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
- exit-if-ui-or-docs-branch
- checkout
- setup_remote_docker:
version: 18.09.3
version: 20.10.17
docker_layer_caching: true
- go_test:
log_dir: "/tmp/testlogs"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GOFMT_FILES?=$$(find . -name '*.go' | grep -v pb.go | grep -v vendor)
SED?=$(shell command -v gsed || command -v sed)


GO_VERSION_MIN=1.19.1
GO_VERSION_MIN=1.19.2
PROTOC_VERSION_MIN=3.21.5
GO_CMD?=go
CGO_ENABLED?=0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Developing Vault

If you wish to work on Vault itself or any of its built-in systems, you'll
first need [Go](https://www.golang.org) installed on your machine. Go version
1.19.1+ is *required*.
1.19.2+ is *required*.

For local dev first make sure Go is properly installed, including setting up a
[GOPATH](https://golang.org/doc/code.html#GOPATH). Ensure that `$GOPATH/bin` is in
Expand Down
2 changes: 1 addition & 1 deletion changelog/_go-ver-1120.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:change
core: Bump Go version to 1.19.1.
core: Bump Go version to 1.19.2.
```
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multi-stage builder to avoid polluting users environment with wrong
# architecture binaries.
ARG VERSION=1.19.1
ARG VERSION=1.19.2

FROM golang:${VERSION} AS builder

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# architecture binaries. This file only currently works for linux/amd64.
FROM debian:buster AS builder

ARG VERSION=1.19.1
ARG VERSION=1.19.2
ARG CGO_ENABLED=0
ARG BUILD_TAGS
ENV JOBS=2
Expand Down
2 changes: 1 addition & 1 deletion website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The website can be run locally through node.js or [Docker](https://www.docker.co

### With Docker

Running the site locally is simple. Provided you have Docker installed, clone this repo, run `make`, and then visit `http://localhost:3000`.
Running the site locally is simple. Provided you have the [latest version](https://docs.docker.com/engine/release-notes/) of Docker installed, clone this repo, run `make`, and then visit `http://localhost:3000`.

The docker image is pre-built with all the website dependencies installed, which is what makes it so quick and simple, but also means if you need to change dependencies and test the changes within Docker, you'll need a new image. If this is something you need to do, you can run `make build-image` to generate a local Docker image with updated dependencies, then `make website-local` to use that image and preview.

Expand Down
2 changes: 2 additions & 0 deletions website/content/docs/get-started/developer-qs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ For an out-of-the-box runnable demo application showcasing these concepts and mo
- [Docker](https://docs.docker.com/get-docker/) or a [local installation](https://learn.hashicorp.com/tutorials/vault/getting-started-install?in=vault/getting-started) of the Vault binary
- A development environment applicable to one of the languages in this quick start (currently **Go**, **Ruby**, **C#**, **Python**, **Java (Spring)**, and **Bash (curl)**)

-> **Note**: Make sure you are using the [latest version](https://docs.docker.com/engine/release-notes/) of Docker. Older versions may not work. As of 1.12.0, the recommended version of Docker is 20.10.17 or higher.

## Step 1: Start Vault

!> **Warning**: This in-memory “dev” server is useful for practicing with Vault locally for the first time, but is insecure and **should never be used in production**. For developers who need to manage their own production Vault installations, this [page](https://learn.hashicorp.com/tutorials/vault/production-hardening) provides some guidance on how to make your setup more production-friendly.
Expand Down

0 comments on commit d463811

Please sign in to comment.